Skip to content

fix(workspace): Inbox pane — Open canvas on chats only; an ask's Open in chat goes to the chat that raised it (#3714) - #3724

Merged
vybe merged 2 commits into
devfrom
feature/3714-inbox-pane-item-actions
Oct 14, 2026
Merged

vybe merged 2 commits into
devfrom
feature/3714-inbox-pane-item-actions

Conversation

@vybe

@vybe vybe commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Fixes #3714 — Workspace Inbox reading pane. Independent draft off dev (chain-asks-1014, trinity-pm orchestrator, 2026-10-14). Draft until the operator merges.

What

  • portalInbox.js: a pure askOriginThread(item) that reuses the ask card's askThreadLink rule and returns the chat a turn raised the ask in, or null.
  • PortalInboxPane.vue: Open canvas shows only on chat items, in both the split header and the stacked More menu. An ask (approval / question / alert) gets Open in chat only when a chat turn raised it, sent as the card's own open-thread event so an unloaded or archived chat still opens. A background ask shows no actions and the header keeps its height. More renders only for chats, so an ask never gets an empty menu. Mentions lose Open canvas too, since it is now a chat-only action.
  • Specs: portalInbox.spec.js (new askOriginThread block: raised-in-turn, background, no chat, the string 'true' trap, discussion_chat_id only, no snapshot, thread/mention) and portalInbox.mount.spec.js (every ask kind, Open in chat → open-thread, no More on an ask, mention has no Open canvas; positive fixtures set both chat_id and raised_in_turn). The old ask-shows-canvas pin was replaced in place. portalInboxShell.mount.spec.js untouched and green.
  • Docs: requirements/core-agent.md, architecture/workspace.md, feature-flows/workspace-inbox.md now say Open canvas is a chat action and describe an ask's Open in chat. No doc still says "chat or an ask".

Rulings carried (orchestrator, on the operator's behalf — plan file)

T1 gate in the template beside the thread-only checks + pure helper · T2 mentions lose Open canvas (chat-only action) · T3 the header ignores discussion_chat_id (the card already offers Continue discussion) · T4 Open in chat lands at the bottom of the chat; an a:<ask_id> anchor is deferred, not filed · T5 navigation sends open-thread, not a URL. All five follow the planner's recommendation.

Review + security

/review (Fable, report-only): MERGEABLE — rider checks (a)–(f) all hold; one informational (this body must state T2 — done above). Mutation check: Vue fix reverted in a scratch worktree → 8 new cases red, 195 green. /cso --diff: no secrets, no invisible Unicode, no v-html or URL building added; the helper fails closed to "no action".

Tests

npx vitest run tests/unit/portalInbox: 9 files, 275 passed. Ratchet specs (source-text, raw-color, loading-gate): 28 passed. Full npm run test:unit: 365 files, 5913 passed (builder's run, 6m38s). Not run here: live stack.

Before merge

Handoffs

  • ent#901 (sibling chain) adds a "Withdrawn by the agent" history row in PortalInboxList.vue / PortalAsks.vue; no shared file with this branch.

🤖 Generated with Claude Code

Trinity Agent (trinity) and others added 2 commits October 14, 2026 11:34
… in chat goes to the chat that raised it (#3714)

Open canvas (split and the stacked More) now renders only on a thread item.
An ask whose turn raised it (askThreadLink: raised_in_turn === true + chat_id)
gets Open in chat, emitting the card's own open-thread {id, agent_name} via the
new pure askOriginThread; a background ask gets no actions. Stacked More renders
only on a thread, so an ask never shows an empty menu. Mentions lose Open canvas
too (T2). discussion_chat_id is ignored (T3).

Red first: the 5 askOriginThread unit cases (export missing) and the 8 new mount
cases (open-canvas present / open absent / More present) failed on dev; with the
helper landed and the pane unchanged, the 8 mount cases stayed red.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… chat (#3714)

Requirements, architecture and the Inbox feature flow said Open canvas shows on
chats and asks alike (T6); they now match the code. Grep of src/frontend/tests
for the old rule: only portalInbox.mount.spec.js pinned it (rewritten in the
previous commit); portalInboxShell.mount.spec.js selects a thread and stays true.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vybe vybe added the ui PR touches the frontend UI — triggers Playwright e2e tests label Oct 14, 2026
@vybe

vybe commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

Merge-tree record (orchestrator, 2026-10-14): this branch merges cleanly onto live dev (fa6c9df). Open PRs sharing files — #2984, #2713, #2709 (core-agent.md, workspace.md) — show the same conflict count against this branch as against live dev (5 / 4 / 7), so this branch adds no conflict; their drift is their own.

@trinity-ability

Copy link
Copy Markdown
Contributor

/validate-pr — #3724 (tip 053b27b, base dev fa6c9df) — APPROVE

Lane B (frontend + docs; no lane-C/schema paths; tests/ has deletions — the old ask-shows-canvas pin, replaced in place, which is the behaviour this fix reverses). 7 files, +146/−25. Draft.

Category Status Notes
Commits / base ✅ 2 conventional fix(workspace): commits; targets dev, sits on the live tip
Issue link ✅ Fixes #3714 (P1, type-bug, theme-ui-ux)
Status auto-promotion ⚠️ keyword present, but #3714 is labelled status-ready, not status-in-progress; the merge workflow promotes in-progress → in-dev, so the label may need setting by hand after merge
Requirements / architecture / flow ✅ core-agent.md, architecture/workspace.md, feature-flows/workspace-inbox.md all updated; nothing still says "chat or an ask"
Security §4.1–4.10 ✅ no keys, emails, IPs, host paths or mode changes; no v-html or URL building added
Structural review ✅ /review + /cso --diff MERGEABLE (plan file); I1 (state T2 in the PR body) is done
Merge gate, Tier 1 ✅ every check on the tip passes (incl. build, e2e, journey-smoke, regression diff); dev-ci is success on fa6c9df; no open dev-ci red issue
Code quality / scope ✅ the gate sits in the template beside the thread-only checks, with a pure helper that reuses askThreadLink (T1)

Execution coverage (§5.4)

changed symbol / test executed by live consumer verdict
askOriginThread portalInbox.spec.js (7 cases incl. the string 'true' and discussion_chat_id) + the mount cases PortalInboxPane.vue askThread computed → header v-if / @click ✅
pane header gates (Open canvas thread-only, Open in chat on asks, More thread-only) portalInbox.mount.spec.js mounts the real PortalInbox (jsdom), split and stacked Portal.vue <PortalInbox @open-thread="openNewThread">; pane → PortalInbox.vue:202 re-emits ✅
production wiring of open-thread mount asserts PortalInbox.emitted('open-thread') = {id:'s9', agent_name:'scout'} and that open-chat is not emitted Portal.vue → openNewThread (the existing card path; the card's own link is :thread-link="false" in the pane, so no duplicate button) ✅
source-text reads none added — ✅

Mutation (fix PR), re-run here in an isolated worktree: with PortalInboxPane.vue reverted to dev and the new tests kept, 8 cases fail and 267 pass. Those 8 are every new mount case, including the T2 mention case. With the fix in place: portalInbox* + the source-text, raw-color and loading-gate ratchets → 12 files, 303 passed.

Findings

Recommendation: APPROVE. The scope matches the issue and the T1–T5 rulings. The tests fail when the fix is reverted, and Tier 1 and dev are green.

@trinity-ability trinity-ability left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

merge-train: validated at 053b27b — /validate-pr APPROVE + fresh /review READY (0 critical; mutation runs: fix reverted → 8 red, emit hand-off deleted → 2 red). Lane B, merges clean onto dev, dev-ci green on e4e739f.

@vybe
vybe merged commit 475ea96 into dev Oct 14, 2026
25 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ui PR touches the frontend UI — triggers Playwright e2e tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants