Repository navigation
Open exact chats through workspace links - #152
Conversation
5f851b4 to
fda417c
Compare
fda417c to
2c762c9
Compare
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2846c4feba
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| await selectSessionForTab(sessionId, tab) | ||
| checkCurrent() | ||
| } | ||
| go(addressPath(workspaceId, { tab, search: '' }), { replace: true }) |
There was a problem hiding this comment.
Preserve history for imperative chat navigation
When an exact chat is opened through useAppletEvent or useNavigationClient, navigateHref invokes openLinkedChat directly, so there is no intermediate /chats/... history entry like the anchor-click path creates. Unconditionally replacing here therefore overwrites the current tab URL, and Back skips the page the user navigated from; this also differs from ordinary moi:/views/... navigation, which pushes history. Reserve replacement for resolving a direct/intermediate chat route, or push an entry before resolving imperative requests.
Useful? React with 👍 / 👎.
Chat links now open the chat’s home tab, select that exact chat, and reveal the sidebar or popup. The “Started from another chat” card uses the same route to open its source chat.
The address bar becomes the destination’s plain tab URL. Unknown chats or unavailable home tabs quietly return to Overview.
Review points:
Stacked on
tinkering/view-chats; this PR contains only the chat-link changes.Verification:
lib/navigation.test.ts,useWorkspaceNavigation.test.tsx,useSelectedSession.test.ts, andMarkdownContent.test.tsxwithbun test.bun test server/test/navigation-cli.test.ts server/navigation-relay.test.ts.bun run typecheck, lint, formatting, andgit diff --checkpassed; lint has existing warnings.