Skip to content

polish: Windows taskbar badge, terminal Close session / Move to worktree, per-item queued attachments, multi-line highlighting (#1512 I4) - #1514

Merged
currentbits merged 4 commits into
mainfrom
coder/1512-i4-polish-leftovers-38dee2
Oct 6, 2026
Merged

currentbits merged 4 commits into
mainfrom
coder/1512-i4-polish-leftovers-38dee2

Conversation

@currentbits

Copy link
Copy Markdown
Owner

Item I4 of #1512: leftovers from #1493–#1506.

What changed

  1. Windows taskbar overlay badge for the needs-you count (feat: dock badge + attention sound, JetBrains editors with line:col, Mermaid diagrams, em-dash-free UI copy (#1506 H4) #1511's source). A dark circle with 1–9, then 9+, drawn from a tiny built-in pixel font (electron/taskbarOverlay.js), because nativeImage can't take SVG and a canvas needs a window. Windows opened later get it too. Unit-tested only; not yet seen on a real Windows machine.
  2. Terminal (rest of P1: Bind terminal sessions to the current worktree and clean up removed threads #1183):
    • Close session ends the shell without restarting; the output stays with a "[session closed]" marker.
    • A shell left outside the thread's worktree offers Move to worktree: a one-click restart in the right cwd, with the old output above a "[moved to …]" separator.
    • Both are new options on the existing terminal.close and terminal.open; no new channels.
  3. Queued attachments belong to their item. The drain, Send now and Steer now send only that item's files, and moving, removing or editing an item carries them along. Each item shows a "N files" label. Old rows migrate with all files on the first item, which is where they were already sent.
  4. Multi-line highlighting: each diff side or file preview is highlighted as a whole, then split back into lines with span nesting kept valid. Comments and template strings colour every line. Diff sides are highlighted separately, so a comment can't spill from removed lines into added ones. Idle slicing is kept (~200 lines), extending up to 2,000 when a slice ends inside a comment or string.

Verified independently, on main merged with this branch and #1513:

🤖 Generated with Claude Code

Willem and others added 4 commits October 6, 2026 17:58
Windows has no badge-count API, so draw the count as a 16x16 ink disc
with paper digits (1-9, then 9+) and set it with setOverlayIcon.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Close session ends a shell without restarting it; its scrollback stays
and the next open carries it over. A shell the thread's worktree left
behind gets a one-click Move to worktree that restarts it in the right
cwd with the old scrollback above a separator. Both ride on the
existing close/open channels (keep / move flags), so no new IPC.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Queue rows gain itemAttachments, aligned with items. The drain, Send
now and Steer now each send only that item's files; reorder, remove
and edit carry them along. attachments stays as the flattened list.
Old rows migrate on load with every file on the first item, which is
where the one-per-turn drain already sent them. The queue strip shows
each item's file count.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
useHighlightedLines takes line groups and highlights each as one
document, then splits the HTML back into lines, closing open spans at
each break and reopening them on the next. Diffs pass one old-side and
one new-side group per hunk; a file preview is one group. Idle slicing
stays at ~200 lines; a slice that ends inside a comment or string is
redone up to 2000 lines long so it colours through.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 6, 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-06T16:26:25.354091Z 6a29f72 PR opened
ℹ️ 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: 6a29f72ffc

ℹ️ 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".

Comment thread src/useCoder.ts
Comment on lines +1129 to +1130
const restFiles = queuedItemFiles(latest, now.length).filter((_, j) => j !== at);
await editQueued(rest.join("\n\n"), id, rest, restFiles).catch(() => {});

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 Remove the exact duplicate item that was steered

When two queued items have identical prompt text but different attachments, steering the later item sends that later item's files, but now.indexOf(item) selects the first matching prompt and this filter removes the first item's files instead. The already-steered item therefore remains queued with its attachments and can be sent again, while the unsteered item loses its files. Track the selected occurrence or a stable item identity rather than locating it by prompt text.

Useful? React with 👍 / 👎.

@currentbits
currentbits merged commit cd1d419 into main Oct 6, 2026
6 checks passed
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.

1 participant