Skip to content

tui: fold Multitask into Operate; remember /provider picker#4244

Merged
Hmbown merged 2 commits into
mainfrom
codex/v0868-fix-multitask-operate
Jul 8, 2026
Merged

tui: fold Multitask into Operate; remember /provider picker#4244
Hmbown merged 2 commits into
mainfrom
codex/v0868-fix-multitask-operate

Conversation

@Hmbown

@Hmbown Hmbown commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Summary

  • Collapse the visible mode roster to Act / Plan / Operate (no Multitask, no 4/5 gaps); fold delegation into Operate; keep yolo/4 as invisible one-way Act+Bypass shorthand.
  • Mirror /model picker memory onto /provider (catalog/configured view + highlighted row).
  • Credit the docs(constitution): add anti-polling rule for sub-agent waiting strategy #4098 anti-polling harvest in CHANGELOG + CONTRIBUTORS; pin footer agents-chip test sidebar so dogfood settings.toml cannot hide it.

Test plan

Made with Cursor

Copilot AI review requested due to automatic review settings July 8, 2026 18:28

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@claude

claude Bot commented Jul 8, 2026

Copy link
Copy Markdown

Reviewing PR #4244

  • Gather context (diff, changed files, PR description)
  • Review core.rs / app.rs mode-collapse logic (Multitask → Operate fold, invisible yolo/4 shorthand)
  • Review authority.rs / hotbar/actions.rs for provider/model route-safety
  • Review provider_picker.rs memory changes (mirrors /model picker)
  • Review theme/footer/header/localization prune for dead references
  • Check test coverage for new/changed behavior
  • Post final review summary

View job run

Make the visible mode roster Act/Plan/Operate with no Multitask or
numeric gaps, keep yolo/4 as invisible Act+Bypass shorthand, mirror
/model picker memory onto /provider, and credit the #4098 harvest.
@Hmbown Hmbown force-pushed the codex/v0868-fix-multitask-operate branch from 941ad13 to c616350 Compare July 8, 2026 18:32
@claude

claude Bot commented Jul 8, 2026

Copy link
Copy Markdown

Claude finished @Hmbown's task in 3m 36s —— View job


Reviewing PR #4244

  • Gather context (diff, changed files, PR description)
  • Review core.rs / app.rs mode-collapse logic (Multitask → Operate fold, invisible yolo/4 shorthand)
  • Review authority.rs / hotbar/actions.rs for provider/model route-safety
  • Review provider_picker.rs memory changes (mirrors /model picker)
  • Review theme/footer/header/localization prune for dead references
  • Check test coverage for new/changed behavior
  • Post final review summary

Summary

Clean, mechanical mode-collapse (Multitask removed, Yolo folded to an invisible Act+Bypass shorthand) plus a well-scoped /provider picker memory feature mirroring the existing /model picker. I did not find any correctness bugs or provider/model route-safety violations. One minor simplification nit below. CHANGELOG.md / crates/tui/CHANGELOG.md / docs/CONTRIBUTORS.md changes correctly credit the #4098 anti-polling harvest per this repo's stewardship conventions (that anti-polling code itself already exists in the tree — crates/tui/src/tools/subagent/mod.rs:3974-3992 — this PR only adds the missing changelog/credit entries).

Route-safety (EPIC #2608): core/authority.rs, core/engine.rs, commands/groups/config/status.rs, and tools/subagent/mod.rs all switch on the explicit AppMode enum, never on a model-string prefix or freeform text. apply_session_spawn_policy (crates/tui/src/tools/subagent/mod.rs:4343) keeps an exhaustive _ => None catch-all after the Multitask arm was deleted, so removing that arm doesn't change behavior for any other mode. No issues here.

Exhaustiveness / correctness:

  • AppMode::number(), mode_style(), mode_color(), mode_runtime_instructions(), safety_summary(), etc. all correctly fold Yolo into the Agent/Auto arms rather than leaving a stale reference to the deleted Multitask variant — verified there's no leftover AppMode::Multitask match arm anywhere in the diff (would have been a compile error, but worth confirming semantics too: Yolo.next()/.previous() fall through to the Self::CYCLE.iter().position None branch → Self::Agent, matching the updated test assertions in app/tests.rs).
  • docs/CONTRIBUTORS.md and both CHANGELOG.md files are consistent with each other.

Minor — reuse/simplification nit (crates/tui/src/tui/provider_picker.rs:1197-1223, restore_memory):

if memory.catalog_view {
    self.view = ProviderListView::Catalog;   // set once here...
}
if let Some(remembered_id) = memory.selected_provider_id.as_deref() {
    if let Some(idx) = self.rows.iter().position(|row| row.provider_id == remembered_id) {
        if self.row_visible(idx) || memory.catalog_view {
            if memory.catalog_view {
                self.view = ProviderListView::Catalog;   // ...redundantly reassigned here
            }
            self.selected_idx = idx;
        }
    }
}

The inner if memory.catalog_view { self.view = ProviderListView::Catalog; } is dead code — self.view was already set to Catalog unconditionally a few lines above whenever memory.catalog_view is true, so this branch can never observably change anything. The mirrored model_picker.rs::restore_memory (which this PR's description says it copies) doesn't have this duplication — it sets the view once and then only touches selected_model_idx. Not a bug, just a leftover from iterating on the logic; safe to drop the inner assignment.
Fix this →

Minor — orphaned localization keys: MessageId::AppModeYolo / AppModeYoloHint (and their en.json strings "AppModeYolo": "YOLO (deprecated)", "AppModeYoloHint": "...") are no longer referenced by short_name()/hint() (both now route Yolo through the Agent arm) but are still declared in the enum, ALL_MESSAGE_IDS, and en.json. Harmless (still compiles, no dead-code warning since ALL_MESSAGE_IDS constructs them), but they're now unreachable translation strings you could prune in a follow-up.

Tests: The listed test-plan items (app_mode_helpers_centralize, number_keys_select_modes, test_mode_switch_command_accepts, test_cycle_mode_reverse, list_esc_emits_dismiss_memory, esc_reports_browsing_context, footer/theme/hotbar tests) look complete for the behavior changed — mode roster, numeric shorthand gaps, and picker-memory round-trip are all directly asserted. I was not able to actually execute cargo test in this review environment (the tool call requires interactive approval that isn't available here), so this is a static read of the test code, not a confirmed pass — the PR author's checked-off test plan is the executed evidence.

Not evaluated (out of scope per PR description): live Operate fan-out acceptance (#4097, blocked on missing API keys) and the catalog lane (#4186#4188, gated on crates/config PRs #4034/#3781).

@claude

claude Bot commented Jul 8, 2026

Copy link
Copy Markdown

Reviewing PR #4244 (update after new push)

  • Gather context (diff, changed files, PR description)
  • Check what changed since the last review (synchronize event)
  • Re-review any updated logic
  • Post final review summary

View job run

@Hmbown

Hmbown commented Jul 8, 2026

Copy link
Copy Markdown
Owner Author

CI fix pushed

Failed: Test (macos-latest) / Test (windows-latest) (ubuntu Test is a no-op stub on GitHub).

Root cause: Multitask→Operate left stale expectations — DEFAULT_HOTBAR still had mode.yolo, YOLO user-facing copy is now "Act", and mode-invariant prompt markers speak Agent.

Fix: 573f7cbc0 — bind default hotbar slot 5 to mode.operate, update YOLO/header/hotbar/mode-matrix assertions.

CI re-running on the new head.

@Hmbown

Hmbown commented Jul 8, 2026

Copy link
Copy Markdown
Owner Author

CI babysit — macOS test alignment

macOS CI failed on 10 tests after Multitask→Operate / invisible-YOLO cleanup. Pushed a follow-up that:

  • Swaps default hotbar slot 5 mode.yolomode.operate (config + KEYBINDINGS + example)
  • Updates YOLO assertions to expect Act labels / Agent prompt markers (invisible permission shorthand)
  • Drops mode.yolo hotbar action expectations

Local: all 10 previously failing filters green. Co-author trailer check clean (no bot trailers).

@Hmbown Hmbown force-pushed the codex/v0868-fix-multitask-operate branch from 573f7cb to 703aea8 Compare July 8, 2026 18:59
DEFAULT_HOTBAR now binds mode.operate (not mode.yolo), and assertions
expect Act-labeled YOLO shorthand plus Agent prompt markers so macOS CI
matches the folded mode roster.

Signed-off-by: Hunter B <hmbown@gmail.com>
@Hmbown Hmbown force-pushed the codex/v0868-fix-multitask-operate branch from 703aea8 to 3730ce5 Compare July 8, 2026 18:59
@Hmbown

Hmbown commented Jul 8, 2026

Copy link
Copy Markdown
Owner Author

Follow-up: rewrote tip commit(s) to drop Co-authored-by: Cursor (rejected by scripts/check-coauthor-trailers.py). Force-pushed with lease.

@claude

claude Bot commented Jul 8, 2026

Copy link
Copy Markdown

Claude finished @Hmbown's task in 2m 8s —— View job


Reviewing PR #4244 (update after new push)

  • Gather context (diff, changed files, PR description)
  • Check what changed since the last review (synchronize event / CI-fix pushes)
  • Re-review updated logic (hotbar default, YOLO/Act assertions, mode-matrix)
  • Post final review summary

Summary

I reviewed the delta since my previous pass: commit 3730ce5 (fix(tui): align Multitask→Operate tests with invisible YOLO), which was the CI-babysitting fix for the macOS/Windows test failures. No new logic was introduced — this is purely test/config/doc alignment for behavior already implemented in the first commit.

What changed and verification:

  • crates/config/src/lib.rs:717 / config.example.toml:105 / docs/KEYBINDINGS.md:70: default hotbar slot 5 now binds mode.operate instead of the removed mode.yolo. Confirmed mode.yolo is fully deregistered — crates/tui/src/tui/hotbar/actions.rs has no "mode.yolo" registration left (only "mode.operate" at line 585, AppHotbarKind::Mode(AppMode::Operate)), and the updated test at actions.rs:2322 (registry.get("mode.yolo").is_none()) matches actual registry state, not just an assertion change.
  • crates/tui/src/tui/hotbar/actions.rs:2314-2338: test now dispatches mode.operate and asserts app.mode == AppMode::Operate / operate.is_active(&app) — consistent with mode.operate being a first-class hotbar action (AppHotbarKind::Mode(AppMode::Auto | AppMode::Operate) is handled at actions.rs:911 and :929).
  • crates/tui/src/commands/groups/config/config.rs:2522: /mode yolo now asserts "Switched to Act mode" — matches the invisible Act+Bypass shorthand described in the PR summary (YOLO still sets AppMode::Yolo/allow_shell/trust_mode per the unchanged assertions below it, only the user-facing copy changed).
  • crates/tui/src/core/engine/tests.rs:3699-3707: mode-invariant matrix now expects setting: "agent" / prompt_marker: "##### Mode: Agent" for the yolo case — correctly reflects that prompt/config surfaces speak Agent instead of a distinct YOLO marker.
  • crates/tui/src/tui/widgets/header.rs:663,681,734,738: header truncation tests updated from "Yolo"/'Y' to "Act"/'A', and the extreme-width test now checks !rendered.contains("Operate") instead of !rendered.contains("Agent") — correct, since YOLO's header label is now "Act" and Operate is a distinct visible mode that must not leak into a narrow YOLO-mode render.

No correctness bugs, no provider/model route-safety issues (this commit touches only mode-label wiring, not provider/model selection), and no dead code introduced — the mode.yolo action was fully removed rather than orphaned. This mirrors the minor nit I raised on provider_picker.rs::restore_memory in the previous review, which is still open but non-blocking.

Not re-verified in this pass: I could not execute cargo test/cargo check in this review environment (tool approval unavailable), so this is a static read confirming the test/assertion changes match the actual registry and mode-mapping code, not a confirmed local test run. CI (CI, PR #4244 workflows) is currently in progress on this exact push — that's the authoritative signal for whether the macOS/Windows fix actually resolves the 10 failures Hunter described.
· Branch

@Hmbown

Hmbown commented Jul 8, 2026

Copy link
Copy Markdown
Owner Author

CI fix — Multitask→Operate test drift

Cause: Folding Multitask into Operate / making YOLO an invisible Act+Bypass shorthand left 10 unit tests asserting the old roster (mode.yolo default hotbar slot, “Switched to YOLO mode”, header chip Y/Yolo, YOLO prompt markers).

Fix (pushed): 573f7cbc0fix(tui): align Multitask→Operate tests with invisible YOLO

  • DEFAULT_HOTBAR slot 5 → mode.operate
  • YOLO mode-switch / header / invariant-matrix assertions expect Act-labeled shorthand + Agent prompt markers
  • Hotbar mode-action tests dispatch mode.operate

Local verify: previously failing 10 tests now pass.
CI: re-run in progress after the push.

@Hmbown Hmbown merged commit 3dc9610 into main Jul 8, 2026
18 checks passed
@Hmbown

Hmbown commented Jul 8, 2026

Copy link
Copy Markdown
Owner Author

✅ Post-fix CI: Test (macos/windows/ubuntu), Lint, Version drift, Mobile smoke all green on 573f7cbc0.

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