Skip to content

fix: refresh live goal sidebar counters - #63

Merged
danyel117 merged 1 commit into
mainfrom
fix/issue-62-live-sidebar
Oct 3, 2026
Merged

danyel117 merged 1 commit into
mainfrom
fix/issue-62-live-sidebar

Conversation

@danyel117

Copy link
Copy Markdown
Contributor

Closes #62.

Summary

  • Refresh the OpenCode 1 and 2 goal sidebars from the shared, atomically written goal state file so token usage, auto-continue counts, and checkpoints update during long runs.
  • Keep transcript snapshots as the fallback when the state file is unavailable; distinguish a cleared goal from a failed read.
  • Share the lightweight state-path resolver between the server and source-shipped TUI, and include it in the published package.

Validation

  • bun run lint — passed.
  • bun run typecheck — passed.
  • bun test — 314 passed, 0 failed.
  • bun run build — passed.
  • bun run pack:dry-run — passed; includes src/state-path.ts and the TUI source.

Claude Opus audit

  • Audit 1: found a high-severity stale-sidebar case after clear and a medium test gap; both fixed.
  • Audit 2: found the same stale-counter behavior in the OpenCode 1 sidebar; fixed with shared polling and a regression test.
  • Audit 3: found a medium test timing risk; switched test state writes to atomic rename and extended deadlines. No fourth audit was requested. No known high or medium findings remain.

@danyel117
danyel117 merged commit c7ffbb8 into main Oct 3, 2026
5 checks passed
@danyel117
danyel117 deleted the fix/issue-62-live-sidebar branch October 3, 2026 06:44
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]: TUI goal sidebar shows stale Tokens/Auto-continues during an active run (frozen at create_goal snapshot; only Time ticks)

1 participant