Skip to content

Fix stale activity dots after missed completion hooks - #11

Open
ognjeeen wants to merge 1 commit into
masterfrom
feature/recover-stale-activity-dots
Open

ognjeeen wants to merge 1 commit into
masterfrom
feature/recover-stale-activity-dots

Conversation

@ognjeeen

Copy link
Copy Markdown
Owner

Summary

A missed Stop hook leaves activity dots running after a task finishes, even when other sessions complete normally. The widget now checks tracked turns every 15 seconds through the local Codex app-server and clears activity only when the exact turn has both a terminal status and a completion timestamp.

The check requests metadata with items omitted, follows pagination, and preserves activity on unknown results, unsupported requests, or timeouts. A late response cannot clear a newer turn. Shutdown cancels pending checks before disposing the shared session.

Validation

  • Release restore and build passed. Restore used an explicit nuget.org source because this machine has an unrelated additional package source.
  • All 211 tests passed on this feature branch, including missing-hook recovery, parallel sessions, late responses, timeouts, shutdown, and completion metadata parsing.
  • Live Windows validation with Codex CLI 0.154.0 and the real named pipe recovered an omitted Stop after 15 seconds and preserved the currently running task through the next check.
  • GUI animation was not visually verified because the Windows automation tool did not expose the widget window.

Limitations

Automatic recovery requires thread/turns/list support and a recorded completion timestamp. A hard termination without recorded completion can still require a later lifecycle event or widget restart. A reconstructed interrupted status without a completion timestamp is deliberately not treated as proof of completion.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-15T09:49:44.115783Z c3b8386 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c3b838609a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


public async Task ReconcileAsync(CancellationToken cancellationToken = default)
{
ObjectDisposedException.ThrowIf(_disposed != 0, this);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Cancel the timer before marking the monitor disposed

If the periodic timer fires after DisposeAsync sets _disposed but before _lifetime.CancelAsync() requests cancellation, this check throws ObjectDisposedException while the exception filter in RunReconciliationAsync still sees an uncancelled token. That permanently faults _reconciliationTask, and the subsequent await in DisposeAsync propagates through MainWindowOnClosing, preventing the usage monitor and shared app-server session from being disposed during shutdown.

Useful? React with 👍 / 👎.

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