Skip to content

Open exact chats through workspace links - #152

Merged
molefrog merged 3 commits into
mainfrom
tinkering/chat-links
Oct 9, 2026
Merged

molefrog merged 3 commits into
mainfrom
tinkering/chat-links

Conversation

@tonyfresher

Copy link
Copy Markdown
Collaborator

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.

moi:/chats/<id> → /workspace/<workspace-id>/views/<home-view-id>

The address bar becomes the destination’s plain tab URL. Unknown chats or unavailable home tabs quietly return to Overview.

Review points:

  • Selection keeps its existing ownership: browser-local with Collab, shared otherwise.
  • Opening another chat awaits unpinning and selection persistence; opening the pinned chat preserves its pin.
  • Navigating away cancels pending resolution, and CLI acknowledgement waits for the redirect.

Stacked on tinkering/view-chats; this PR contains only the chat-link changes.

Verification:

  • 54 tests passed across lib/navigation.test.ts, useWorkspaceNavigation.test.tsx, useSelectedSession.test.ts, and MarkdownContent.test.tsx with bun test.
  • 8 CLI/relay tests passed with bun test server/test/navigation-cli.test.ts server/navigation-relay.test.ts.
  • bun run typecheck, lint, formatting, and git diff --check passed; lint has existing warnings.
  • Live browser verification was blocked by the browser tool’s URL policy.

@molefrog
molefrog added this pull request to stack #155 October 7, 2026 13:16
@tonyfresher
tonyfresher marked this pull request as draft October 7, 2026 13:44
Base automatically changed from tinkering/view-chats to main October 7, 2026 15:40
@tonyfresher
tonyfresher force-pushed the tinkering/chat-links branch from 5f851b4 to fda417c Compare October 7, 2026 15:40
@tonyfresher
tonyfresher force-pushed the tinkering/chat-links branch from fda417c to 2c762c9 Compare October 7, 2026 15:55
@molefrog
molefrog marked this pull request as ready for review October 9, 2026 11:50
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-09T11:54:18.950455Z 2846c4f Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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 })

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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 👍 / 👎.

@molefrog
molefrog merged commit eb90718 into main Oct 9, 2026
1 check passed
@molefrog
molefrog deleted the tinkering/chat-links branch October 9, 2026 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants