Skip to content

fix(members): wire onFileOpen into the crewmate chat (release/0.8.0) - #18441

Closed
rubencu wants to merge 1 commit into
kirodotdev:release/0.8.0from
rubencu:fix/0.8.0-crewmate-chat-file-open
Closed

rubencu wants to merge 1 commit into
kirodotdev:release/0.8.0from
rubencu:fix/0.8.0-crewmate-chat-file-open

Conversation

@rubencu

@rubencu rubencu commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: On the Crewmates page, clicking a file path in a crewmate's reply opens that file in the page's side panel, the way it does in an ordinary chat.

Bug fix. A crewmate's reply names the files it produced; the dashboard confirms each path and draws it as a path chip with a file glyph. On the Crewmates page a click on that chip does nothing visible. The same chip in a chat session opens the file as a Files tab in the side panel. Observed on the 0.8.0.9 build (cut from release/0.8.0), on a dashboard served by a remote gateway.

Why it matters

A crewmate's output is mostly documents it wrote to disk, and the reply is where it points the reader at them. Every reader of a crewmate chat on 0.8 hits this on every file the crewmate names: the chip looks actionable, the click answers nothing, and the reader has to copy the path and open it elsewhere. The chat page has had the working behaviour since #14458 (2026-09-29); release/0.8.0 branched one day earlier and never received it.

Not a goal

What changed (motivation → approach → change)

Symptom: a confirmed path chip in a crewmate reply opens nothing.

Root cause: MarkdownRenderer routes a chip click through activatePath, which calls actions.onFileOpen(path) when the host wired one and otherwise falls back to revealOrOpen(path, 'reveal'), the OS file-manager reveal. On a remote gateway that reveal has nothing to show. On release/0.8.0 the Members page's ChatPane has no onFileOpen prop at all, so no handler ever reaches the renderer; ChatMessageList, createTranscriptRenderers, renderAssistantBubble and AssistantMessage already forward one when given it. Main fixed this in #14458 by adding the prop to ChatPane and passing the page's opener.

Change, the ChatPane and MembersPage hunks of #14458 applied to the release branch:

  • website/src/components/ChatPane.tsx: a documented onFileOpen prop, handed to createTranscriptRenderers (and its dependency array) and to the ChatMessageList mount.
  • website/src/pages/members/MembersPage.tsx: the DM pane receives openFile from the page's existing usePanelDocumentActions, the same opener the panel's Files view uses, so the tab lands in the member slot's bucket and onOpened reveals whichever placement (docked column or overlay) is live.

Backwards compatibility

Compatible: one optional prop added to ChatPane; every other host passes nothing and keeps today's behaviour (capability by omission, like openSideChat).

Tests

website/src/test/ChatPane.fileOpen.test.tsx (new, 4 tests) pins the hop at the pane boundary with a MarkdownRenderer stand-in that activates a chip exactly as activatePath does when a handler is wired:

  • a crewmate's reply (crewmate prop, steer-only) opens a named file through the host handler;
  • a split-pane reply opens a named file through the host handler;
  • a sent prompt's attachment card opens through the host handler in a member DM;
  • without a host handler the reply renders with no opener.

Mutation check: with the ChatPane.tsx hunks reverted the three positive tests fail (3 failed, 1 passed); with them, 4 passed. vitest run over every ChatPane.* test and src/pages/members: 33 files, 603 tests passed. tsc -p tsconfig.app.json clean, eslint clean on the three files.

Manual verification

Not run on a built SPA. The code path below the pane is the one the chat page exercises daily: MarkdownRenderer → PathActionCtx → InlineCode → activatePath → onFileOpen, unchanged by this PR. The before state is the reporter's screenshot on 0.8.0.9: confirmed path chips in a crewmate reply, side panel closed, click answers nothing.

Screenshots / video

Why no screenshot: nothing changes at rest. The chip, its glyph and the panel draw exactly as before; the change is what a click on an existing chip does, and that behaviour is pinned by the tests above.

Related Issues

Backport of the ChatPane and Members-page part of #14458 to release/0.8.0.

no linked issue: #14458 is the main-branch fix this backports, already closed; no issue tracks the 0.8 symptom.

Pattern harvest

Rule candidate: review-prompt
Pattern: a transcript host mounts ChatPane (or ChatMessageList) on a surface with a side panel but passes no onFileOpen; the renderer's fallback is the OS reveal, which is silent on a remote gateway, so the omission shows up as a dead chip rather than an error.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

On the Crewmates page, a file path a crewmate names in its reply draws
as a confirmed path chip, but clicking it opens nothing: the page's
ChatPane has no `onFileOpen` prop, so the markdown renderer sees no
handler and `activatePath` falls back to the OS file-manager reveal,
which on a remote gateway shows the reader nothing. The chat page opens
the same chip as a Files tab in its side panel.

Backport of the ChatPane and Members-page part of kirodotdev#14458, which main
has carried since 2026-09-29 (release/0.8.0 branched a day earlier):

- ChatPane takes `onFileOpen` and hands it to the transcript renderers
  (the crewmate bubble, the attachment card, the tool row) and to
  ChatMessageList, whose render context already forwarded it.
- MembersPage passes its `usePanelDocumentActions` opener, the same one
  the panel's Files view uses, so the tab lands in the member slot's
  bucket and the live placement (docked column or overlay) is revealed.

The split-pane binding and the attachment-card inert state of kirodotdev#14458
are not carried over; the release branch never had the behaviours they
corrected. `ChatPane.fileOpen.test.tsx` pins the hop at the pane
boundary: a crewmate reply, a split-pane reply and a sent prompt's
attachment card each open through the host handler, and without a
handler the reply renders with no opener.
@rubencu
rubencu requested a review from a team as a code owner October 9, 2026 10:20
@rubencu
rubencu requested review from CrysisDeu and removed request for a team October 9, 2026 10:20
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention fork Pull request from a fork (external contributor) readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Oct 9, 2026
@rubencu

rubencu commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor Author

Status note for reviewers: every check on head 51d8315 is green except PR Readiness, and that one cannot turn green on this PR by itself.

The change itself is the two ChatPane / MembersPage hunks of #14458, already on main since 2026-09-29, plus a test. Details and verification are in the description.

@iamwhatever

Copy link
Copy Markdown
Contributor

Thanks for tracking this down, @rubencu! Crewmate chats already open file paths in the side panel on main and on release/0.9.0 (the onFileOpen wiring from #14458 is present in MembersPage there), and release/0.8.0 has had no changes since its final changelog merge on Oct 9 now that 0.9.0 is cut. Closing since there is no further 0.8 release to carry the backport. If a 0.8.x patch release is still planned, please reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork Pull request from a fork (external contributor)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants