Skip to content

fix(chat): preserve selected effort and avoid submit usage delays - #514

Merged
astyfx merged 2 commits into
mainfrom
fix/effort-incorrect
Sep 8, 2026
Merged

fix(chat): preserve selected effort and avoid submit usage delays#514
astyfx merged 2 commits into
mainfrom
fix/effort-incorrect

Conversation

@astyfx

@astyfx astyfx commented Sep 8, 2026

Copy link
Copy Markdown
Member

Summary

Preserve the effort selected in the composer through prompt submission, and run queued prompts with the effort captured when they were queued. Previously, stale draft overrides could replace the displayed effort, while queued items did not retain effort at all.

Avoid a usage-query round trip on every submit: use the latest cached usage below 97%, refresh before dispatch at 97% or above, and immediately block a cached exhausted account. Missing usage refreshes in the background. Queue admission uses cached usage; actual dispatch checks again. Older overlapping usage responses cannot replace newer provider snapshots.

Validation

  • bun run typecheck passed.
  • 149 focused tests passed, including effort propagation through IPC validation and Codex turn parameters, queue persistence, and usage-guard latency and blocking.
  • bun run check:max-lines-ratchet and git diff --check passed.
  • Desktop interaction and end-to-end latency were not measured locally.

Legacy queued items without stored effort retain the prior fallback behavior. This complements the model-switch and migration fixes in #492.

@astyfx
astyfx requested a review from a team as a code owner September 8, 2026 03:39
@astyfx
astyfx requested review from paul-seo73 and png-1105 and removed request for a team September 8, 2026 03:39
@upwind-code-us

upwind-code-us Bot commented Sep 8, 2026

Copy link
Copy Markdown

Upwind Upwind Code Scan - ✅ Passed

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

Total breakdown: 🔶 5 High | 🟡 44 Medium | 🟢 3 Low

View full analysis in Upwind Console

Scan completed in 16s

Scan history (2 scans)
Commit Scanned at New Resolved Net
935e705 2026-09-08 03:41 UTC 0 0 0
c36c538 < 2026-09-08 03:53 UTC 0 0 0

Last scanned: c36c538 · 2026-09-08 03:53 UTC

@upwind-code-us

upwind-code-us Bot commented Sep 8, 2026

Copy link
Copy Markdown

Upwind Upwind IaC Scan - ✅ Passed

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

View full analysis in Upwind Console →

Scan completed in 5s

Scan history (3 scans)
Commit Scanned at New Resolved Net
935e705 2026-09-08 03:41 UTC 0 0 0
935e705 2026-09-08 03:41 UTC
c36c538 < 2026-09-08 03:53 UTC 0 0 0

Last scanned: c36c538 · 2026-09-08 03:53 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 5a26969 into main Sep 8, 2026
6 checks passed
@astyfx
astyfx deleted the fix/effort-incorrect branch September 8, 2026 03:58
@astyfx astyfx mentioned this pull request Sep 8, 2026
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