Skip to content

feat(advisor): archive consults for review - #384

Merged
astyfx merged 1 commit into
mainfrom
fix/advisor-details
Aug 21, 2026
Merged

feat(advisor): archive consults for review#384
astyfx merged 1 commit into
mainfrom
fix/advisor-details

Conversation

@astyfx

@astyfx astyfx commented Aug 21, 2026

Copy link
Copy Markdown
Member

Background

On-demand Advisor consults were transient: each task retained only one exchange snapshot, the floating card hid automatically, and the question and response were lost after the session state changed. This made it impossible to review multiple consults from a turn or record whether the advice was useful.

Scope

  • Archive each consult in a bounded, newest-first per-task log while preserving terminal updates and existing user verdicts.
  • Add a consult detail dialog showing the question, advice, lifecycle, absolute spend, and the bounded sequence of work observed after the consult.
  • Add Helpful, Not helpful, and Ignored verdicts with per-advisor-model tallies.
  • Add entry points from the Advisor monitor card and turn-activity shelf.
  • Keep impact attribution explicit: the UI shows ordering and cost, but does not infer that advice caused later work.
  • Replace the obsolete interaction-map guidance with the consult-log design and document known limits.

This is intentionally session-only. No provider event, IPC contract, or persistence schema was added.

Verification

  • bun run test:ci passed, including license, reliability, documentation-path, max-lines, switch-exhaustiveness, and typecheck gates.
  • The isolated test run passed 423 test files.
  • Renderer and desktop builds passed.
  • Targeted Advisor and turn-activity tests passed: 82 tests, 263 assertions.
  • git diff --check passed.

Known limitations and rollback

  • Reloading the app still clears the consult log; durable storage is a follow-up.
  • Post-consult work is a bounded, lossy sample from the live turn and the most recent finished turn per task.
  • Verdict tallies intentionally survive log-entry eviction and therefore have no stable denominator.
  • Provider retries can repeat consultIndex; entries are keyed by exchange identity where available.
  • Lifecycle stages remain capped by the existing provider activity limit.
  • The change is reversible by reverting commit 44db583f; no data migration is required.

Breaking changes

None.

Follow-up validation

The authenticated live-app flow still needs a manual check: perform two consults in one turn, allow the floating card to hide, then reopen the complete log from both entry points.

@astyfx
astyfx requested a review from a team as a code owner August 21, 2026 04:36
@astyfx
astyfx requested review from dodonmountain and heath-s and removed request for a team August 21, 2026 04:36
@astyfx
astyfx enabled auto-merge (squash) August 21, 2026 04:36
@upwind-code-us

upwind-code-us Bot commented Aug 21, 2026

Copy link
Copy Markdown

Upwind Upwind Code Scan - ✅ Proceed with Deployment

0 newly introduced vulnerabilities · 0 resolved · 81 total in this PR vs main

🔴 1 Critical | 🔶 30 High | 🟡 47 Medium | 🟢 3 Low

View full analysis in Upwind Console

Scan completed in 19s

Scan history (1 scan)
Commit Scanned at New Resolved Net
44db583 < 2026-08-21 04:37 UTC 0 0 0

Last scanned: 44db583 · 2026-08-21 04:37 UTC

@upwind-code-us

upwind-code-us Bot commented Aug 21, 2026

Copy link
Copy Markdown

Upwind Upwind IaC Scan - ✅ Proceed with Deployment

0 newly introduced misconfigurations · 0 resolved · 0 total in this PR vs main

View full analysis in Upwind Console →

Scan completed in 3s

Scan history (1 scan)
Commit Scanned at New Resolved Net
44db583 < 2026-08-21 04:37 UTC 0 0 0

Last scanned: 44db583 · 2026-08-21 04:37 UTC

@heath-s heath-s left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@astyfx
astyfx merged commit c9cc1b5 into main Aug 21, 2026
4 checks passed
@astyfx
astyfx deleted the fix/advisor-details branch August 21, 2026 04:43
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