Skip to content

feat(webview): thinking effort surfaces — header chip, composer toggle, in-chat display (DTE series 4/5) #1331

Description

@easonLiangWorldedtech

What

The user-visible surfaces for dynamic thinking effort:

  • TaskHeader chip — current effective effort + source badge (default / Zoo (auto) / you), visible at task start (init state computed in the webview from settings + model default; extension pushes sync the source badge)
  • Composer bottom-bar toggle — between the API-profile selector and the auto-approve (⚡) control; temporary and current-task-only; writes the same task-local state the model tool writes (scope identical)
  • In-chat one-line display for model/user changes (switch_mode-style row with partial streaming)
  • Extension -> webview state messaging (display copy per tab; authoritative state stays extension-side)

Part of the Dynamic Thinking Effort series (5 PRs). Master design issue: easonLiangWorldedtech#28.

PR protocol (all series PRs): draft PR until CI is fully green -> switch to ready -> CodeRabbit bot review addressed in full -> 100% test coverage on patch lines. Each PR <= 1000 diff lines, based on latest upstream main (stacked on preceding series PRs where noted; rebased to pure main once dependencies merge).

Stacking: PR 4/5 — stacked on PR 3.

Acceptance criteria

  • Chip shows the init state at task start and updates with the correct source on every change
  • Bottom button changes only the current task; resets on task switch; persisted Settings value never changes
  • Menu lists only the model-supported effort levels; adaptive-class models labeled "soft guidance"
  • Layout: icon-only trigger with tooltip, flex-shrink-0 + min-w-[28px] (matches AutoApproveDropdown)
  • Tests: JSDOM (binding, clamp, disabled, click -> postMessage) + Playwright CT visual snapshot committed for the new user-visible layout (Docker-updated baseline); i18n keys in all required locales
  • 100% patch coverage; <= 1000 diff lines

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions