Skip to content

fix(desktop): replace the tasks "…" menu with a Select button - #12911

Closed
nathanchengx wants to merge 2 commits into
BasedHardware:mainfrom
nathanchengx:fix/todo-select-button
Closed

nathanchengx wants to merge 2 commits into
BasedHardware:mainfrom
nathanchengx:fix/todo-select-button

Conversation

@nathanchengx

@nathanchengx nathanchengx commented Sep 7, 2026 •

Copy link
Copy Markdown
Contributor

What changed and why

The To-Do page toolbar hid "Select tasks…" behind a three-dot More menu, so the page's most common secondary action took a click, a read, and a guess. The menu is replaced by a Select button, the word alone with no glyph, drawn with the toolbar's existing PageQueryActionLabel (which now takes an optional icon), shown whenever there are tasks to select. The task-assistant toggle that shared the menu keeps its flag gate (TaskAgentSettings.isChatEnabled) and becomes its own labelled Assistant button. Two unused chip-styled variants of these buttons that were never mounted are removed.

Carried fix (temporary)

Rebased onto current main and carrying the one-commit fix from #12932 (Vision OCR language query via the request instance) so the Desktop Swift checks can run past the deprecation error that has broken main since #12888 (#12931). It is byte-identical to #12932; once that merges, a rebase drops it from this PR automatically. This PR does not otherwise touch Rewind.

Product invariants affected

  • INV-NAV-1 (path match only: MainWindow/Pages/TasksPage.swift; the toolbar action changed, no navigation or destination routing)
  • INV-TASK-1 (path match only; task loading, buckets, and paging untouched)

How it was verified

  • DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer swift build -c debug in desktop/macos/Desktop → Build complete, no warnings in TasksPage.swift; pinned swift-format lint clean
  • Exercised in the running app (named bundle omi-todo-select-button, signed in against the dev backend): the To-Do toolbar shows To Do ▾ on the left and Select + New Task on the right, no three-dot menu. Window screenshot taken.
  • The new button calls the same toggleMultiSelectMode() the menu item called, and the multi-select toolbar (Cancel / Delete) it hands off to is unchanged.

Tests

No test change. The change is a toolbar control swap with no new logic; both actions were already reachable through the same view-model calls, and the accessibility identifier tasks-select-toggle is now the mounted control for automation.

Failure class (fixes)

Failure-Class: none

🤖 Generated with Claude Code

https://claude.ai/code/session_01FDiUGZjXHZBEzDQbCqLMeB

@Git-on-my-level Git-on-my-level added positive-signal Automation verified a genuine fix/quality contribution macOS labels Sep 7, 2026
@Git-on-my-level

Copy link
Copy Markdown
Member

Verified the premise and the wiring before commenting — this is a clean control swap.

What I checked, per file:

  • TasksPage.swift — the toolbar now mounts selectTasksButton (gated on !viewModel.displayTasks.isEmpty) and taskAssistantButton (gated on chatProvider != nil && TaskAgentSettings.shared.isChatEnabled); both gates are copied verbatim from the menu items they replace inside the removed tasksMoreMenu, and the multi-select branch (cancelMultiSelectButton / multiSelectControls) is untouched. selectTasksButton renders with PageQueryActionLabel, the same component addTaskButton already uses, so the toolbar stays coherent, and both actions still call the same view-model entry points (toggleMultiSelectMode(), the chat-panel open/close path).
  • Dead-code claim verified: in the base file selectModeButton and chatToggleButton appear only at their own definitions — as private members they could not be referenced elsewhere — so removing them changes nothing that was mounted.
  • Accessibility: tasks-select-toggle previously lived only on the never-mounted selectModeButton, so the identifier was unreachable; it now sits on the live toolbar button, which strictly improves automation reachability. The retiring tasks-more-actions identifier is referenced nowhere else — checked the desktop test target and the e2e flows (tasks.yaml, tasks-crud.yaml, tasks.snapshot.json, task-thread.yaml, keyboard-shortcuts.yaml): no hits.
  • changelog/unreleased/20260907-tasks-select-button.json — matches the format documented in desktop/macos/changelog/README.md.

About the red checks: both failures trace to a single suite, ChatTranscriptGestureHarnessTests.testLoadingEarlierMessagesLeavesTheReaderOnTheSameRows (scroll-restore assertions: scrollTop 0.0 vs ~3325). That chat-transcript harness has no reference to TasksPage or multi-select, recent main Desktop Swift CI runs are green, and this head's Release Compile and desktop-core-e2e-t0 both passed. Everything points to an unrelated flake — a re-run should clear it, and if it reproduces it still is not reachable from this diff.

One product note for maintainers: with the menu gone, the Assistant toggle becomes a persistently visible labelled button whenever it is enabled, where it used to be tucked behind "More". That reads as the right call — it matches the toolbar's labelled-button language — and it is a one-line revert if you would rather keep the toolbar minimal.

Since the PR is still a draft I'm leaving a signal rather than a formal review — once it is marked ready and the flaky suite re-runs green, this should be a quick human sign-off.

AI-generated maintainer feedback posted on behalf of the Omi maintainers.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

@undivisible undivisible left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Light CR: Select button instead of … menu is clear UX. Desktop Swift Build/Static still red on tip — please green those (and mark ready out of draft) before re-review/merge.

@nathanchengx

Copy link
Copy Markdown
Contributor Author

Marked ready for review. The red Desktop Swift checks on this PR come from main, not this diff: the merge ref fails the release compile on RewindOCRService.swift:134 (deprecated VNRecognizeTextRequest.supportedRecognitionLanguages(for:revision:), introduced in #12888; -warnings-as-errors under release). Tracked in #12931. This branch does not touch Rewind; the bounded pre-push gate (debug compile + targeted tests) passed locally and the change was exercised in a running named bundle.

@cubic-dev-ai cubic-dev-ai 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.

No issues found across 3 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Re-trigger cubic

@nathanchengx
nathanchengx force-pushed the fix/todo-select-button branch from 31c709a to 866c91e Compare September 7, 2026 16:07
@nathanchengx

Copy link
Copy Markdown
Contributor Author

Rebased onto current main and carrying the one-commit fix from #12932 so Desktop Swift Build/Static can go green here; it is byte-identical to that PR and a rebase drops it once #12932 merges. Already out of draft.

Nathan and others added 2 commits September 7, 2026 16:30
The To-Do toolbar hid "Select tasks…" behind a three-dot More menu, so
the most common secondary action on the page took a click, a read and a
guess. A labelled Select button in the toolbar says what it does. The
task-assistant toggle that shared the menu gets its own labelled button
(behind the same chat-enabled flag), and the two unused chip-styled
variants of these buttons are removed.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01FDiUGZjXHZBEzDQbCqLMeB
`PageQueryActionLabel` takes an optional icon; without one it draws the
title by itself instead of collapsing to a glyph. Select uses it, since
the word already says everything a checkmark could.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01FDiUGZjXHZBEzDQbCqLMeB
@nathanchengx
nathanchengx force-pushed the fix/todo-select-button branch from 866c91e to 8ffcc21 Compare September 7, 2026 20:33
@nathanchengx

Copy link
Copy Markdown
Contributor Author

Rebased onto current main, which now carries the Vision OCR fix (83d6e6e39c), so the copied #12932 commit is dropped and Desktop Swift Build/Static run against main's own code. Diff is unchanged otherwise. Out of draft.

@Git-on-my-level

Copy link
Copy Markdown
Member

Follow-up on the rebased head (8ffcc21) — first automation pass on the word-alone refinement, so this focuses on what changed since the earlier note on the draft.

Verified per file:

  • TasksPage.swift — selectTasksButton now draws PageQueryActionLabel(title: "Select"), word only, no glyph. The mounting gates are still copied verbatim from the removed tasksMoreMenu items (!viewModel.displayTasks.isEmpty for Select; chatProvider != nil && TaskAgentSettings.shared.isChatEnabled for Assistant), and the multi-select branch (cancelMultiSelectButton / multiSelectControls) is untouched. taskAssistantButton is the renamed, previously-unmounted chatToggleButton with its action body identical (close panel → open chat for the keyboard-selected task → open empty panel with adjustWindowWidth(expand: true)). Identifier bookkeeping is clean: tasks-select-toggle now sits on the live button (on main it was only reachable on the dead selectModeButton), the retired tasks-more-actions has no remaining references in the desktop tests or e2e flows, and tasks-assistant-toggle is new.
  • PageQueryToolbar.swift — PageQueryActionLabel.icon is now String? defaulting to nil, guarded by if let in both branches of the ViewThatFits. The other call sites (Rewind, Apps, Memories, Conversations, both MemoryGraph views, and addTaskButton here) all pass an explicit icon, so this stays source-compatible repo-wide. With icon == nil both ViewThatFits candidates collapse to the word, which is benign (the first always fits).
  • desktop/macos/changelog/unreleased/20260907-tasks-select-button.json — single "change" key matching the documented unreleased format, and the text matches what actually ships.

Status since the last pass: the PR is ready (no longer draft), and the Desktop Swift suite is fully green on this head — Build & Tests, Release Compile, Static & Test Contracts, and desktop-core-e2e-t0 all pass; the earlier ChatTranscriptGestureHarnessTests scroll-restore flake is gone. The carried #12932 commit is confirmed absent — the diff touches only the three files above, and main picked up the Vision OCR fix directly (83d6e6e).

One small nit: the "Carried fix (temporary)" section of the PR description is now obsolete (that commit was dropped in the rebase) — worth pruning so the description matches the branch.

For the re-review: both asks from the earlier change request — green Desktop Swift checks and ready-out-of-draft — are satisfied on this head. The direction was already endorsed there, so this should be a quick sign-off.

AI-generated maintainer feedback posted on behalf of the Omi maintainers. Leaving the formal approval with the human re-review already in flight.


by AI on behalf of David — if you need David’s attention urgently, please @Git-on-my-level and escalate with need human response.

@aryanorastar

Copy link
Copy Markdown
Collaborator

Keeping this open. Not approving 8ffcc21a7466. origin/main TasksPage.swift still uses the overflow menu this SHA replaces with a Select button (3 files, changelog included). Hygiene SUCCESS. mergeable CONFLICTING/DIRTY.

— Astar, on behalf of @aryanorastar

@nathanchengx nathanchengx closed this by deleting the head repository Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

macOS positive-signal Automation verified a genuine fix/quality contribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants