Fix Glass path isolation and omnibox URL navigation#55
Open
Yabuku-xD wants to merge 1 commit into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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'sWorkspaceDbmigration 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 isALTER TABLE remote_connections ADD COLUMN remote_env TEXT.All path functions in
crates/paths/src/paths.rsnow use Glass-namespaced directories on every platform:~/Library/Application Support/Glass~/.config/glass~/Library/Logs/Glass~/Library/Caches/Glass$XDG_DATA_HOME/glass$XDG_CONFIG_HOME/glass$XDG_CACHE_HOME/glass%LOCALAPPDATA%\Glass%APPDATA%\Glass%LOCALAPPDATA%\GlassLog files renamed
Glass.log/Glass.log.old.Note for existing Glass users: Data previously stored under
Application Support/Zedis not automatically migrated. A migration can be added in a follow-up if needed.Fix: Omnibox URL navigation (closes #49)
Typing
youtube.com/t3dotgginto the omnibox navigated to a Google search instead of the URL.Root cause:
build_suggestions()always pushedSearchQueryat index 0 and setselected_index = 0, so pressing Enter ran the search even whenlooks_like_url()correctly identified the input as a URL.Fix: when
looks_like_url()returns true,RawUrlis now inserted first (index 0 — the default selection on Enter).SearchQueryremains 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:
youtube.com/path) in the browser omnibox navigating to a search result instead of the URL