Skip to content

feat(btw): Add model defaults and refine activity indicators - #4029

Merged
wsp1911 merged 3 commits into
openBitFun:mainfrom
wsp1911:feat/btw-model-settings
Nov 23, 2026
Merged

wsp1911 merged 3 commits into
openBitFun:mainfrom
wsp1911:feat/btw-model-settings

Conversation

@wsp1911

@wsp1911 wsp1911 commented Nov 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Add a default model setting for new /btw side questions: inherit the parent (default), select a configured model, or select a model pool.
  • Group the default model and close-confirmation controls under AI → Session & Memory → Side questions, with settings search and legacy-link migration.
  • Exclude running and finishing BTW sessions from the main session overview activity indicator. Subagent and background-command activity continues to trigger the indicator.

Type and Areas

Type: Feature, bug fix, UI/UX

Areas: Rust core/config contracts, Desktop/Tauri, CLI Peer host, Web UI, localization, docs

Motivation / Impact

Users can choose a separate model for side questions while retaining parent inheritance by default. The execution host applies the default on first submission, and an explicit choice in a side question takes precedence. Existing side questions retain their own selection.

A running BTW session previously activated the overview indicator despite being absent from the Agent tree. Excluding BTW activity keeps the indicator aligned with the activities users expect to find there.

Verification

The following checks passed during implementation:

cargo test --locked -p openbitfun-config-contracts --lib btw::tests
cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git --lib btw_
cargo test --locked -p openbitfun-desktop --no-default-features --lib api::btw_api::tests
cargo test --locked -p openbitfun-cli --bin openbitfun peer_host::commands::btw::tests
cargo test --locked -p openbitfun-product-domains --no-default-features remote_surface
pnpm run check:web
pnpm run lint:web
pnpm run i18n:audit
pnpm run capabilities:generate
pnpm run capabilities:check
pnpm run capabilities:test
pnpm run check:core-boundaries
pnpm run website:test

Focused frontend checks also passed:

pnpm --dir src/web-ui run test:run src/flow_chat/utils/sessionLineage.test.ts src/flow_chat/components/modern/FlowChatHeader.test.tsx src/flow_chat/components/modern/SessionTreePopover.test.tsx
pnpm --dir src/web-ui run test:run src/app/scenes/settings/pages/ai/BtwSettingsSection.test.tsx src/app/scenes/settings/settingsRegistry.test.ts src/app/scenes/settings/pages/shared/SettingsPageComposition.test.ts src/app/global-search/interactiveCapabilityActivator.test.ts src/app/global-search/providers/interactiveCapabilitySearchProvider.test.ts

These groups passed 40 and 83 tests respectively. Additional focused tests covered model selection, initial submission, Peer capability negotiation, session lifecycle, and settings loading.

The lint follow-up passed pnpm run lint:web with 0 errors and one pre-existing react-refresh/only-export-components warning in WidgetView.tsx. The following model-setting and model-selector regression group passed 142 tests:

pnpm --dir src/web-ui run test:run src/app/scenes/settings/pages/ai/BtwSettingsSection.test.tsx src/flow_chat/components/ModelSelectorProviderLevels.test.tsx src/flow_chat/components/ModelSelectorExternal.test.tsx src/flow_chat/components/ModelSelectorAcpMode.test.tsx

Reviewer Notes

  • AI-assisted implementation with automated verification. Native WebView visual checks were not performed.
  • Model defaults belong to the execution host; close confirmation retains its existing controller-local storage key.
  • Missing configuration defaults to inheritance. Unavailable or future saved choices are preserved and fail explicitly rather than being silently replaced.
  • Desktop and CLI Peer hosts advertise btw_model_defaults_v1; older hosts retain their existing path and show the setting as unsupported. Existing settings capability IDs and historical wire destinations are preserved.
  • Remote-workspace metadata and Peer surface switches were covered with fixtures. No live SSH/Docker workspace, Remote Control, Peer Device, or Detached Dispatch integration run was performed.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

Allow new side questions to inherit their parent or use a saved model
or pool on the execution host. Preserve explicit child choices and
unavailable selections, and negotiate support with older peers.

Group model defaults and close confirmation under Session & Memory.
Migrate old settings links and update search, translations, and docs.

Validation: focused Rust and frontend tests, check:web, i18n audit,
capability checks, and core boundary checks. Remote coverage uses
workspace fixtures and simulated Peer switches.
Keep running and finishing side questions from lighting the main
session overview indicator. Preserve activity reporting for subagents
and background commands.

Cover active BTW states, nested side questions, and mixed subagent
activity with regression tests.

Validation: 40 focused tests and pnpm run check:web passed.
Use explicit assignment when invalidating pending BTW model loads in
effect cleanup, and remove the obsolete shared-default callback
dependency.

Validation: lint:web passed with 0 errors and one existing WidgetView
warning; check:web and 142 focused settings/model-selector tests passed.
@wsp1911
wsp1911 merged commit 5676fcf into openBitFun:main Nov 23, 2026
12 checks passed
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.

1 participant