Skip to content

Fix Glass path isolation and omnibox URL navigation#55

Open
Yabuku-xD wants to merge 1 commit into
Glass-HQ:mainfrom
Yabuku-xD:fix/path-isolation-and-omnibox-url
Open

Fix Glass path isolation and omnibox URL navigation#55
Yabuku-xD wants to merge 1 commit into
Glass-HQ:mainfrom
Yabuku-xD:fix/path-isolation-and-omnibox-url

Conversation

@Yabuku-xD
Copy link
Copy Markdown

Fixes #51 and #49.

Fix: Glass path isolation (closes #51)

Glass was reading and writing user data under ~/Library/Application Support/Zed (and platform equivalents), colliding with Zed stable's paths. This caused Glass's WorkspaceDb migration at step 36 (ALTER TABLE workspaces ADD COLUMN active_mode TEXT) to be written into Zed's SQLite file, which Zed stable then rejected because its own step 36 is ALTER TABLE remote_connections ADD COLUMN remote_env TEXT.

All path functions in crates/paths/src/paths.rs now use Glass-namespaced directories on every platform:

Platform Data dir Config dir Logs Cache
macOS ~/Library/Application Support/Glass ~/.config/glass ~/Library/Logs/Glass ~/Library/Caches/Glass
Linux/FreeBSD $XDG_DATA_HOME/glass $XDG_CONFIG_HOME/glass same $XDG_CACHE_HOME/glass
Windows %LOCALAPPDATA%\Glass %APPDATA%\Glass same %LOCALAPPDATA%\Glass

Log files renamed Glass.log / Glass.log.old.

Note for existing Glass users: Data previously stored under Application Support/Zed is not automatically migrated. A migration can be added in a follow-up if needed.

Fix: Omnibox URL navigation (closes #49)

Typing youtube.com/t3dotgg into the omnibox navigated to a Google search instead of the URL.

Root cause: build_suggestions() always pushed SearchQuery at index 0 and set selected_index = 0, so pressing Enter ran the search even when looks_like_url() correctly identified the input as a URL.

Fix: when looks_like_url() returns true, RawUrl is now inserted first (index 0 — the default selection on Enter). SearchQuery remains as the second option via arrow-down. Plain text queries are unchanged.

Added tests verifying the suggestion ordering for URL-like and plain-text inputs.

Release Notes:

  • Fixed Glass writing its database and user data into Zed's application support directory, which was corrupting Zed stable's workspace database
  • Fixed typing a bare URL (e.g. youtube.com/path) in the browser omnibox navigating to a search result instead of the URL

Issue Glass-HQ#51: Glass was writing its DB and user data into
~/Library/Application Support/Zed (and platform equivalents),
colliding with Zed stable's paths and corrupting its WorkspaceDb
migrations. All path functions in crates/paths/src/paths.rs now
use Glass-namespaced directories on every platform:
- macOS: ~/Library/Application Support/Glass, ~/.config/glass,
  ~/Library/Logs/Glass, ~/Library/Caches/Glass
- Linux: XDG dirs with glass/ suffix
- Windows: AppData dirs with Glass suffix
- Log files renamed Glass.log / Glass.log.old

Issue Glass-HQ#49: Typing a bare URL like youtube.com/t3dotgg into the
omnibox navigated to a Google search instead of the URL. The bug
was that build_suggestions() always inserted SearchQuery at index 0
with selected_index=0, so Enter ran the search even when the input
looked like a URL. When looks_like_url() returns true, RawUrl is
now first (the default selection) and SearchQuery is the fallback.
Added tests for the suggestion ordering.
@Yabuku-xD Yabuku-xD requested a review from naaiyy as a code owner April 21, 2026 03:09
@github-actions github-actions Bot added the first contribution Opened by a first-time contributor label Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

first contribution Opened by a first-time contributor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Glass appears to write WorkspaceDb migrations into Zed's stable DB writing to a browser address searches it instead of going to url page

2 participants