Skip to content

fix(bug-report): carry composer's live model onto bug session (#277) - #597

Merged
aarontrowbridge merged 2 commits into
mainfrom
277-bug-carry-the-composers-live-model-selection-onto-the-bug-session
Aug 27, 2026
Merged

aarontrowbridge merged 2 commits into
mainfrom
277-bug-carry-the-composers-live-model-selection-onto-the-bug-session

Conversation

@aarontrowbridge

Copy link
Copy Markdown
Member

Closes #277 — carry live model selection across bridge, fixes stale-model bug.

  • App: report-bug.ts now includes validated model payload (+ variant) from PromptInputV2Composer liveModel(); ReportBugButton accepts model prop; bounded validation
  • Extension: chat_bridge.ts extracts and validates reportBugModel only for amicode.reportBug; extension.ts threads optional model to BugReportManager.reportBug(liveModel?) with precedence live→configured→omit

Tests: 11 new (bug_report + chat_bridge), precedence + malformed/oversized + variant

Related #298 (model picker stale) noted as potential duplicate — same plumbing may fix, needs separate verification, not auto-closed.

Implements branch 277-bug-carry... from hygiene sweep.

Carry the composer's live model selection (provider/model/variant)
across the app→extension command bridge and onto the report-a-bug
arming turn, with precedence over the configured default.

- App (report-bug.ts): include model payload from live selection;
  ReportBugButton now accepts model prop and PromptInputV2Composer
  supplies liveModel() from controller.model.selection (current +
  variant). Payload validated/bounded before postMessage.

- Bridge (chat_bridge.ts): extractReportBugModel already validated;
  now forwarded to vscode.commands.executeCommand('amicode.reportBug',
  model) only for reportBug — other allowlisted commands remain
  payload-free, allowlist size unchanged (10).

- Extension (bug_report.ts, extension.ts): reportBug(liveModel?)
  now threads through open() → armSession() with precedence
  live → configured default → omit (server resolves). Variant
  travels only with live selection; malformed/oversized/absent
  never blocks — falls back. Command registration now forwards
  optional model arg.

Tests: live honoured, variant honoured, precedence over default,
configured fallback, omit when neither, malformed stripped, absent
tolerated, shape/length validation at bridge, allowlist unchanged.

Related #298 (model picker stale) may share root cause — same
tracked-model plumbing — but not auto-closed; see #277 AC.

Co-authored-by: Amico <amico@harmoniqs.ai>
@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5291acd1-473b-4ab4-8efc-7b5310293840


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@aarontrowbridge
aarontrowbridge marked this pull request as ready for review August 27, 2026 14:27
@aarontrowbridge
aarontrowbridge merged commit 4d5d900 into main Aug 27, 2026
8 checks passed
@aarontrowbridge
aarontrowbridge deleted the 277-bug-carry-the-composers-live-model-selection-onto-the-bug-session branch August 27, 2026 14:27
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.

BUG: Carry the composer's live model selection onto the bug session

1 participant