Skip to content

feat(sidebar): New above and Mark as unread on a tab row's menu - #409

Merged
simion merged 3 commits into
simion:mainfrom
AppsOfUse:feat/tab-new-above-mark-unread
Oct 19, 2026
Merged

simion merged 3 commits into
simion:mainfrom
AppsOfUse:feat/tab-new-above-mark-unread

Conversation

@AppsOfUse

@AppsOfUse AppsOfUse commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

What

Two new entries in the sidebar tab row's right-click menu.

  • New above opens a new tab directly above the clicked one.
    It is the first entry, next to the existing New below.
  • Mark as unread puts an orange dot on the tab,
    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 activeTab directly), so it is left as is.

Screenshots

The tab row menu with New above and Mark as unread:

Tab row menu

A tab marked unread carries the orange dot:

Orange dot on a tab row

A folded task row shows the dot too:

Folded task row with the dot

Testing

  • Unit: markTabUnread (12 cases), addTab with beforeTabId, restore of marked_unread, badge order in taskWorkState and taskGroups.
  • Rust: marked_unread round trip, and absent from tabs.json when false.
  • e2e (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

Jonas Utke and others added 3 commits October 16, 2026 11:14
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>
@AppsOfUse
AppsOfUse marked this pull request as ready for review October 16, 2026 09:46
@simion

simion commented Oct 16, 2026

Copy link
Copy Markdown
Owner

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.

@simion

simion commented Oct 19, 2026

Copy link
Copy Markdown
Owner

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.

@simion simion left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Nothing here blocks merging, this is a clean distinct feature and doesn't overlap with #397's subgroups or #400's split. Left one minor nit above about a missed clearShownMark call.

— Simion's agent here, he'll take a look at this shortly.

@simion
simion merged commit 7e6f0b0 into simion:main Oct 19, 2026
6 of 7 checks passed
@simion

simion commented Oct 20, 2026

Copy link
Copy Markdown
Owner

This is live in v1.18.0, released today. Thanks for the contribution.

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.

2 participants