Skip to content

feat(flow-chat): add context usage previews and adjustable conversation width - #3614

Merged
GCWing merged 3 commits into
mainfrom
gcwing/session-usage-chat-layout-20261029
Oct 29, 2026
Merged

GCWing merged 3 commits into
mainfrom
gcwing/session-usage-chat-layout-20261029

Conversation

@GCWing

@GCWing GCWing commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Open session usage in a session-owned side panel with compact totals, latest-request context composition, and opt-in read-only previews for system prompts, rules, skills, tool definitions, MCP tools, and subagent definitions.
  • Persist context attribution with model attempts and keep legacy reports and records readable through optional defaulted fields.
  • Add adjustable conversation width in Appearance settings and by dragging the conversation boundary, retaining correct virtualized height estimates and scrollbar masking.

Type and Areas

Type: Feature / UI/UX / bug fix

Areas: Rust runtime and contracts, desktop/CLI adapters, Web UI, shared Disclosure component, locales, and documentation.

Motivation / Impact

Users can inspect the context and tools behind the latest prepared model request directly from the usage report, and set a comfortable conversation width. Reports remain attached to their owning session across navigation; stale requests from a previous device activation cannot update the current surface.

Verification

Passed locally:

  • pnpm run fmt:rs
  • pnpm run check:web (Appearance, all 28 theme/color surfaces, visual governance, and TypeScript)
  • pnpm run i18n:audit (0 warnings)
  • pnpm --dir src/web-ui run test:run src/app/scenes/settings/pages/application/FlowChatWidthSettingsSection.test.tsx src/flow_chat/components/FlowChatWidthBoundary.test.tsx src/infrastructure/appearance/preferences/flowChatWidthStore.test.ts src/flow_chat/components/modern/flowChatScrollbarMask.test.ts src/flow_chat/components/modern/VirtualMessageList.session-boundary.test.tsx src/flow_chat/components/usage/SessionUsageComponents.test.tsx src/flow_chat/components/usage/ToolDefinitionsPreview.test.tsx src/flow_chat/services/openSessionContextPreview.test.ts src/flow_chat/services/usageReportService.test.ts src/infrastructure/api/service-api/SessionAPI.test.ts src/infrastructure/appearance/builtins/composeAppearancePackage.test.ts src/infrastructure/appearance/compiler/AppearanceCompiler.test.ts (251 tests)
  • pnpm --dir design-system run build:ui and node --test design-system/packages/ui/tests/disclosure.test.mjs (4 tests)
  • cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git --lib -- context_composition system_prompt_preview usage_context_preview account_attempt_ledger_keeps_failed_usage_actual_accounts_and_idempotent_events (8 tests)
  • cargo test --locked -p openbitfun-core-types --test core_type_contracts session_usage_contracts (5 tests)
  • cargo test --locked -p openbitfun-services-core --no-default-features --features local-storage --test session_usage_contracts token_usage_contracts (5 tests)
  • cargo test --locked -p openbitfun-runtime-ports --no-default-features --features agent-api --lib (60 tests)
  • pnpm --dir src/web-ui run test:run src/app/scenes/session/ChatPane.composer-layout.test.tsx src/flow_chat/components/FlowChatWidthBoundary.test.tsx (14 tests; regression check for the missing ResizeObserver fixture found by the first CI run)
  • git diff --check origin/main...HEAD and node scripts/check-git-object-sizes.mjs --base origin/main --head HEAD

GitHub CI must pass before merging.

Reviewer Notes

AI-assisted; focused automated tests passed, broader CI pending. UI interaction and native visual checks were not performed per repository instructions. No live remote scenarios were exercised. Fixtures cover simulated SSH storage selection, device activation isolation, unsupported dispatch preview paths, and legacy payloads; these are not evidence of live remote behavior. Preview content is opt-in and separate from numeric report exports.

Checklist

  • This PR 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.

@GCWing
GCWing merged commit 7250407 into main Oct 29, 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