desktop: a link to a workspace this machine lacks is refused, not a 404 page (GDK-1309) - #89
Merged
Conversation
…04 page (GDK-1309) Two paths navigated the webview to a URL the server can never answer, and the Go text "404 page not found" replaced the app with no menu item to come back (GitHub #85). A gadak:// link naming a workspace that is not on this machine passed the parser — it only checks shape — and landed on /w/<name>/; the Settings… menu on a named workspace built /w/default/, a mount that cannot exist because the primary profile lives at the root with no profiles/ directory. Prefix now maps the primary to "" on every server, as the deep-link grammar already promised, and the view resolver refuses a mount whose profile is not here, telling the user in a dialog instead of a log line. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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 #85 — both reported paths into the bare
404 page not founddocument that replaced the app with no way back.workspace.Prefixnow maps the primary profile (""/default) to""on every server./w/default/was a mount that could never answer (the primary has noprofiles/directory), and the deep-link grammar already defined a segment-less link as the primary mirror, which is/on any serve. The twoprefix_test.gocases that pinned/w/defaultare rewritten;cmd/gadak/views.gocomposeServeURLgets the same mapping through the shared function.resolveViewrefuses when the mount's profile does not exist here (workspace.ProfileExists, behind a var for tests), and the navigator shows a window-attached warning dialog — "this link's workspace is not on this machine (a link from someone else's gadak?)" — instead of navigating. Malformed or hostile links stay log-only as before./w/<name>/mounts for the browser case.Backlog: GDK-1309 (https://gadak.dev/backlog/#/?ks=GDK-1309).
Gates run locally: go build/vet/test (root +
desktop/), gofmt, doc-checks,scripts/scan-internal.sh. Desktop builds are CI-only jobs, hence the PR.🤖 Generated with Claude Code