Skip to content

Track and reopen threads started from roadmap items - #970

Merged
jonathanKingston merged 4 commits into
mainfrom
claude/roadmap-thread-reopen-w80epb
Jul 20, 2026
Merged

jonathanKingston merged 4 commits into
mainfrom
claude/roadmap-thread-reopen-w80epb

Conversation

@jonathanKingston

@jonathanKingston jonathanKingston commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR adds the ability to track chat threads started from roadmap items and quickly reopen them later. When a user clicks "Start thread" on a roadmap item, the thread ID is persisted in the item's thread field. The pane then offers a "Reopen thread" button and a visual chip on the row to jump back to that thread without creating a new one.

Key Changes

  • Thread tracking on start: When "Start thread" is clicked, the created thread ID is stamped onto the item via a new roadmap:setThread IPC handler that updates the item's thread field.

  • Reopen button and chip:

    • Added "Reopen thread" button that switches back to the tracked thread if it still exists
    • Added a visual "thread" chip on roadmap rows that shows when a tracked thread exists
    • Both are hidden when the tracked thread is deleted or doesn't exist
  • Thread lifecycle handling: The pane re-renders when threads are created/deleted (via threads_changed store event) to update button visibility and chips.

  • Graceful fallbacks:

    • If a tracked thread is deleted, the Reopen button hides and Start thread can create a new one
    • Chip clicks don't select the item into the editor—they only reopen the thread
    • Pop-out windows hide both Start and Reopen buttons since they have no chat pane
  • Test coverage: Added comprehensive unit tests covering the happy path, thread deletion, chip interaction, and an e2e test validating the full workflow.

Implementation Details

  • The itemThreadId() helper extracts the thread field from an item
  • getThreadById() and switchThread() helpers from thread-helpers are used to validate and switch threads
  • The setThread API call is best-effort; a failed stamp only costs the Reopen shortcut
  • Thread chip click uses stopPropagation() to prevent row selection
  • Styling added for the thread chip with hover effects; popout.css hides thread-related UI

https://claude.ai/code/session_016hBquXgJpTb5JHQTEsurLg


Note

Low Risk
Localized roadmap UI and knowledge-note frontmatter updates; IPC is validated and scoped to Roadmap notes with no auth or data-model breakage.

Overview
Roadmap items can now remember the chat thread created via Start thread and let users jump back without spawning another thread.

Start thread persists the new thread id on the item through a roadmap:setThread IPC handler (stored in frontmatter thread). Starting again from the same item overwrites that pointer with the latest thread. The pane adds Reopen thread, a list-row thread chip (keyboard-activatable, does not select the row), and refreshes reopen UI on threads_changed when threads are created or deleted. Reopen uses switchThread; if the tracked thread is gone, controls hide and the user gets an error suggesting Start thread again.

Pop-out roadmap windows hide start/reopen/chip (no chat pane). Editor actions use a 3-column grid so buttons don’t clip. Unit and e2e tests cover stamping, reopen, missing thread, and chip behavior.

Reviewed by Cursor Bugbot for commit 9d6f860. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2ce65ed. Configure here.

Comment thread src/renderer/views/roadmap-pane.ts
@cursor

cursor Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_8634257c-6eb0-4a47-9ebd-3745f4c977a4)

@cursor cursor Bot 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.

Stale comment

Not approving: Cursor Bugbot skipped on the latest commit, so automated review is incomplete for this sync. Bugbot's earlier finding is resolved, but human review is still needed before merge. No reviewers assigned.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Merge conflict needs a human

main advanced and screenshot conflicts were resolved automatically, but these non-screenshot files conflict and can't be auto-merged. Resolve them by hand (merge or rebase main):

  • src/preload/api.d.ts
  • src/preload/index.ts
  • src/renderer/views/roadmap-pane.test.ts
  • src/renderer/views/roadmap-pane.ts

@jonathanKingston

Copy link
Copy Markdown
Collaborator Author

Heads-up: this branch has merge conflicts with current main (post #991/#992/#999 CI fixes + roadmap changes). The e2e instability that was failing CI here is addressed on main — after resolving conflicts and updating, CI should be meaningfully greener. Conflicting areas: source files (not just screenshots), so resolving needs feature context.

@jonathanKingston
jonathanKingston enabled auto-merge (squash) July 18, 2026 14:44
claude and others added 2 commits July 19, 2026 22:57
"Start thread" now stamps the created thread's id into the item's `thread`
frontmatter field (new roadmap:setThread IPC). While that thread still
exists, the editor offers a "Reopen thread" button and the list row shows a
clickable thread chip; both switch back to the tracked thread instead of
starting a fresh one. Restamping on a later Start thread points the field at
the newest thread, and a deleted thread simply hides the affordances.

Both controls are hidden in pop-out windows (no chat pane to land in), and
the pane re-renders on threads_changed so chip/button visibility follows
thread create/delete without an IPC round-trip.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016hBquXgJpTb5JHQTEsurLg
@jonathanKingston
jonathanKingston force-pushed the claude/roadmap-thread-reopen-w80epb branch from 4d8e4bd to 6eeccd4 Compare July 19, 2026 22:04
@cursor

cursor Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_cad19d0e-d616-445f-a52e-806cf1575bb0)

@cursor
cursor Bot requested a review from AutomatedTester July 19, 2026 22:05

@cursor cursor Bot 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.

Stale comment

Not approving: Cursor Bugbot skipped on the latest commit (usage limit), so automated review is incomplete for this sync. The earlier Bugbot finding is resolved, but human review is still needed before merge.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cursor

cursor Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_8ab6996e-3bfa-4eb6-ac7e-76fa112857e2)

@cursor cursor Bot 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.

Not approving: Cursor Bugbot skipped on the latest commit, so automated review is incomplete for this sync. The earlier Bugbot finding is resolved and CI is green, but human review is still needed before merge. AutomatedTester is already requested as reviewer.

Open in Web View Automation 

Sent by Cursor Approval Agent: Pull Request Router and Approver

@cursor cursor Bot 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.

Stale comment

PR health — auto-merge kept

Roadmap thread track/reopen has component + e2e coverage (roadmap-thread-reopen.e2e.ts). Auto-merge already on. Tip CI is queued — not retriggering. ~11 behind main; rebase after the in-flight suite finishes if still blocked.

Open in Web View Automation 

Sent by Cursor Automation: Check in with agent-pane prs

Resolve roadmap-pane list-row conflict by keeping both the tracked-thread
reopen chip (this PR) and the ✓/↺ status toggle from main.

@cursor cursor Bot 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.

PR health fleet check (trigger: this PR’s CI success)

Tip 6a44cdaa is MERGEABLE with auto-merge on (sibling already resolved the roadmap-pane conflict vs main’s ✓/↺ status toggle). Tip CI is mid-flight (precheck/autoformat/CodeQL pending) — not retriggering.

Actions this run

  • #1051 — real precheck lint failure (no-unnecessary-condition on stream-cut test assertions). Pushed tip 92f1e509; auto-merge kept; new CI pending.
  • This PR (#970) — left alone (already unblocked + AM; CI running).

Left alone (intentional / already handled)

  • AM ready set (#812, #900, #920, #956, #1023, #1031, #1035, #1041, #1047, #1048, #1049, #1050, …) — auto-merge already on; tip CI queued or green; no idle retriggers.
  • #1035check/CI Passed still infra-red (CHECKS_RUNNER kill mid-coverage:ci); e2e green; AM kept; not re-running into the queue backlog.
  • Worktree stack #1037#1040#1043#1046 — tips green/CLEAN where settled; leaving draft until parent #1035 lands.
  • Intentional drafts: #840, #841, #1006, #1038 (TS7 toolchain), #1044 (superseded by #1050).
  • #978 / #989 — still CONFLICTING; #978 needs human rewrite vs #814 publisher-only release-mac.yml (already tagged @jonathanKingston). #989 spike — leave draft.

No additional drafts marked ready; no medium/high-confidence undrafts beyond the existing AM set.

Open in Web View Automation 

Sent by Cursor Automation: Check in with agent-pane prs

@jonathanKingston
jonathanKingston merged commit 3ac49da into main Jul 20, 2026
18 checks passed
@jonathanKingston
jonathanKingston deleted the claude/roadmap-thread-reopen-w80epb branch July 20, 2026 18:43
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.

3 participants