Skip to content

fix: prism_submit names its workspace default; linked Issues show their GitHub state - #70

Merged
lukemaj merged 3 commits into
mainfrom
fix/68-prism-workspace-and-tool-search
Sep 29, 2026
Merged

lukemaj merged 3 commits into
mainfrom
fix/68-prism-workspace-and-tool-search

Conversation

@lukemaj

@lukemaj lukemaj commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

What: prism_submit now says workspace defaults to this thread's directory, and the Linked PRs and Issues panel shows each linked Issue's current GitHub state (or unknown when it cannot be read) and counts open Issues in its footer.
Why: The description never mentioned the default, so a job ran in the wrong repository (#68); the panel read no Issue state at all and drew every Issue with the open icon, while the footer counted only pull requests (#69).
So what: Review rounds 1 (d6434a1) and 2 (4435f31) by Luna are addressed in 4fce40a; it needs re-review, then the user's merge. The real-thread check of #69 happens after install.

Requirements and who asked: the user (2026-09-29) filed #68 and #69 and asked for both in one PR.
Deleted: making workspace required; a server-side Issue state cache; a manual refresh button; per-Issue issues.detail reads (replaced by one state-only read after review).
Bottleneck: #69's cause: IssueRow hard-coded CircleDotIcon with the success tone and ThreadIssueLink carries no state, so no sync could ever change it; the footer's openCount iterated pull requests only.
Checked myself: ran the targeted tests and typechecks below and read the render and sync code; I did not run the app.

Closes #68
Closes #69

Changes

  • apps/server/src/mcp/toolkits/prism/tools.ts: one sentence on the workspace default (description 576 chars, still starts "Use when"); alwaysLoad.test.ts pins it.
  • AGENTS.md: run vp as pnpm exec vp where it is not on PATH.
  • issues.states RPC (contracts, read scope, handler, IssueService.states): one GraphQL request per host with a resource(url:) alias per Issue selecting only state stateReason; a deleted or invisible Issue returns state: null.
  • apps/web: useLinkedIssueStates reads issues.states on the thread's server in chunks of at most 50 Issues (a failed chunk leaves only its own Issues unknown), on mount, every 60 s while shown, and on each pull request sync. Rows draw IssueStateGlyph, a muted circle while pending, and a question glyph for unknown (failed read or no state). The footer adds open and linked Issues to the pull request counts; pending and unknown Issues are not counted open.

Proof (head 4fce40a)

  • apps/server: vp test run src/issues/IssueService.test.ts src/issues/gitHubIssues.test.ts src/mcp/alwaysLoad.test.ts: 20 passed. IssueService.states with a fake gh: request shape (state only, one request), null for a missing Issue, IssueOperationError on a gh failure, no request for no Issues.
  • packages/client-runtime: vp test run src/state/runtime.test.ts: 29 passed, including a query rereading on its refresh interval while mounted.
  • apps/web: vp test run src/components/issues/ThreadLinksPanel.test.tsx src/components/issues/issueLinks.logic.test.ts: 21 passed. The rendered panel shows the expected row icon for pending, failed, missing, open, done and not-planned Issues and the matching footer counts, including an Issue closed after linking; 120 linked Issues read as chunks of 50, 50 and 20.
  • tsc --noEmit in apps/server, apps/web, packages/contracts, packages/client-runtime: 0 errors.
  • vp lint on the touched files and directories: no findings.

Not covered

  • Behaviour in a real thread (after install, per Linked Issues panel keeps showing closed Issues as open #69's required proof).
  • The footer only renders when the thread has at least one linked pull request (unchanged).
  • A failed chunk read marks that chunk's Issues unknown until its next successful read.

🤖 Generated with Claude Code

…ir GitHub state

- prism_submit's description says workspace defaults to this thread's
  current directory and must be set for another repository or worktree
  (#68). AGENTS.md notes running vp as `pnpm exec vp` where it is not on
  PATH.
- The Linked PRs and Issues panel read no state for Issues and drew every
  row with the open icon; the footer counted only pull requests. The panel
  now reads each linked Issue's current state, rereads it on each pull
  request sync, draws GitHub's state glyph, and counts open Issues in the
  footer (#69).

Closes #68
Closes #69

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L labels Sep 29, 2026
@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Thread transfer impact

✅ Thread transfer remains within every enforced ceiling.

Provider Metric Main baseline This PR Impact PR ceiling
Codex Total thread wire 13.5 KiB 13.5 KiB −11 B (−0.1%) 15.1 KiB ✅
Codex Thread snapshot wire 7.1 KiB 7.1 KiB 0 B (0.0%) 7.3 KiB ✅
Codex Live turn WebSocket wire 6.4 KiB 6.4 KiB −11 B (−0.2%) 7.8 KiB ✅
Codex Live turn WebSocket decoded 56.2 KiB 56.2 KiB 0 B (0.0%) 66.4 KiB ✅
Codex Live turn messages 9 9 0 (0.0%) 21 ✅
Claude Total thread wire 13.5 KiB 13.5 KiB +26 B (+0.2%) 15.1 KiB ✅
Claude Thread snapshot wire 7.1 KiB 7.1 KiB −6 B (−0.1%) 7.3 KiB ✅
Claude Live turn WebSocket wire 6.4 KiB 6.4 KiB +32 B (+0.5%) 7.8 KiB ✅
Claude Live turn WebSocket decoded 57.0 KiB 57.0 KiB +44 B (+0.1%) 66.4 KiB ✅
Claude Live turn messages 8 9 +1 (+12.5%) 21 ✅

Baseline: f8a22e9 · PR result: 4fce40a · Source CI: failure

Scenario and decoded snapshot size

10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

  • Codex decoded thread snapshot: 113.9 KiB
  • Claude decoded thread snapshot: 114.6 KiB

Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

lukemaj and others added 2 commits September 29, 2026 15:04
…nown

Review of d6434a1 (Luna):
- Failed or missing reads are their own `unknown` state: shown with a
  question glyph and not counted open. Before the first read a row is
  `pending` and is not counted either.
- The panel's states query refreshes every 60s while shown, besides mount
  and each pull request sync.
- New `issues.states` RPC reads only `state stateReason` for all linked
  Issues in one aliased GraphQL request per host, instead of one full
  `issues.detail` read (body, comments, closing references) per Issue.

Tests: IssueService.states with a fake gh (request shape, null for a
missing Issue, failure on a gh error, no request for no Issues); the
query runtime rereading on its refresh interval; the panel's state
transitions pending -> open -> done, and failed or missing -> unknown.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… panel

Re-review of 4435f31 (Luna):
- The panel no longer slices linked Issues to 50. It reads them in chunks
  of at most ISSUE_STATES_MAX, one states query per chunk, and a failed
  chunk leaves only its own Issues unknown.
- ThreadLinksPanel.test.tsx renders the panel for pending, failed,
  missing, open, done and not-planned states and checks each row's icon
  and the footer's open and linked counts, including an Issue closed
  after linking.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@lukemaj

lukemaj commented Sep 29, 2026

Copy link
Copy Markdown
Contributor Author

Independent review (Codex gpt-6-luna, three rounds): round 1 on d6434a1 and round 2 on 4435f31 requested changes (failed reads counted as open, no refresh without PR sync, full detail read per Issue; then the 50-Issue cap and no rendered test). All fixed. Round 3 on exact head 4fce40a: APPROVE, no new defect; pnpm exec vp test run src/components/issues/issueLinks.logic.test.ts src/components/issues/ThreadLinksPanel.test.tsx passed (2 files, 21 tests).

@lukemaj
lukemaj merged commit 5273318 into main Sep 29, 2026
17 of 20 checks passed
lukemaj added a commit that referenced this pull request Sep 29, 2026
…unused export

Main's Fork Stack Model and knip checks failed after #70 and #76.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
lukemaj added a commit that referenced this pull request Sep 29, 2026
…s Mac (#78)

* docs: AGENTS.md lets agents stage the merged build on the maintainer's Mac

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

* fix(ci): allowlist fork edits to AGENTS.md and the PR panel; drop an unused export

Main's Fork Stack Model and knip checks failed after #70 and #76.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
lukemaj added a commit that referenced this pull request Sep 29, 2026
#70 and #77 edited AGENTS.md, ThreadPullRequestsPanel.tsx and t3.json
without allowlisting them, and #76 exported a constant nothing imports.
The three files are listed with their feature owners and the constant is
module-local.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Linked Issues panel keeps showing closed Issues as open prism_submit description does not say workspace defaults to the planner's folder

1 participant