Repository navigation
feat(sidebar): New above and Mark as unread on a tab row's menu - #409
Conversation
New above is New below's submenu with addTab(..., { beforeTabId }), so
the pick lands in the clicked tab's slot; resumeClosedTab takes the same
option and an unpinned tab still never lands inside the pinned block.
Mark as unread sets TerminalTab.markedUnread. The row, the folded task
row and every rollup that reads taskWorkBadge draw an orange dot
(--color-marked), ranked under attention and done and over working. It
is not `unread`, so it never reaches the OS notification path. Showing
that tab clears it (setActiveTabId, or setActiveTask when it is the
task's active tab); opening the task on another tab leaves it. It rides
task_set_tabs as `marked_unread`, skipped when false, so it survives a
relaunch and older task files are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… revisited Clicking another tab row re-activates the task first, and setActiveTask read the marked tab still on screen as seen, so the dot went the moment the user left. The mark now clears only when its tab comes on screen: setActiveTask on a task that was not active, setActiveTabId on a tab that was not already showing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…screen Review follow-ups for Mark as unread: - A tab row click picked the task before the tab, so setActiveTask read the task's previous tab as seen and cleared its mark although it never showed. Rows (tree and status section) now pick the tab first, and a tab counts as already showing only when its task is the one on screen. - A marked tab moved into a split pane has no sidebar row, so nothing could clear it; moving it there clears it. - A close or a move that hands the main pane to a marked tab writes activeTab directly, and a click on it is no visit; clearShownMark clears it there when the task is on screen. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The clear-on-screen logic, badge priority, and marked_unread persistence are all correct and consistent across every call site, with no conflict against the existing agent-driven unread states. One tiny redundancy: the markTabUnread early-return in the store action duplicates the already-disabled menu item, but it's harmless to leave as is. Thanks for the contribution! — Simion's agent here, he'll take a look at this shortly. |
|
moveTabToSplit doesn't call clearShownMark like moveTabToPane does, so dragging the active main tab into a split leaves the revealed neighbor's unread dot stuck even though it just took over the main pane. Worth matching the two paths and adding a test for the revealed tab. — Simion's agent here, he'll take a look at this shortly. |
|
This is live in v1.18.0, released today. Thanks for the contribution. |
What
Two new entries in the sidebar tab row's right-click menu.
It is the first entry, next to the existing New below.
the way the blue done dot works.
The dot stays until that tab is next on screen,
also when you mark the tab you are looking at and then leave it.
A folded task row and the compact rail show it as well.
The mark is saved with the tab and survives a relaunch.
Menu order: New above, New below, Mark as unread, separator, Close.
How the mark clears
The mark clears only when its tab actually comes on screen:
clicking the row, switching to its task while it is the task's open tab,
moving it into a split pane,
or being revealed in the open task when the tab in front of it is closed or moved away.
Clicking another tab row of a task that is not open does not clear the mark on that task's last open tab.
To make that last case work, a row click now selects the tab before it activates the task
(project list and Status section).
Side effect: when you open a task through one of its other tab rows,
the tab that task showed last no longer loses its blue done dot,
because it was never on screen.
Badge priority on a task row: attention > done > marked > working > delegated.
Not changed
When a tab is revealed by close or move, other flags of the revealed tab (for example done) are still not cleared.
That predates this branch (close writes
activeTabdirectly), so it is left as is.Screenshots
The tab row menu with New above and Mark as unread:
A tab marked unread carries the orange dot:
A folded task row shows the dot too:
Testing
markTabUnread(12 cases),addTabwithbeforeTabId, restore ofmarked_unread, badge order intaskWorkStateandtaskGroups.marked_unreadround trip, and absent fromtabs.jsonwhen false.tabs-layout.e2e.ts): menu items, New above (2 cases), the dot with its measured colour and disk persistence, marking the open tab and leaving, opening an inactive task through another row.npm test,cargo test,typecheck:e2e, and the tabs-layout and sidebar-status specs are green.Manual test: exercised by hand in a local release build.
New above and Mark as unread from the tab row menu both behave as described,
and the orange dot stays until the tab is visited again.
🤖 Generated with Claude Code