Skip to content

feat(viewer): add /api/observer-status endpoint#231

Merged
kunickiaj merged 1 commit into
mainfrom
03-15-feat_add_observer_status_api_endpoint
Mar 15, 2026
Merged

feat(viewer): add /api/observer-status endpoint#231
kunickiaj merged 1 commit into
mainfrom
03-15-feat_add_observer_status_api_endpoint

Conversation

@kunickiaj
Copy link
Copy Markdown
Owner

@kunickiaj kunickiaj commented Mar 15, 2026

Description

Add /api/observer-status GET endpoint returning the resolved observer runtime state: active provider, model, auth method (anthropic_consumer, codex_consumer, sdk_client, claude_sidecar, etc.), and token presence. Also adds probe_available_credentials() which checks OpenCode's OAuth cache and env vars to report which credential sources are available per provider.

Reads the observer singleton from the module at call time (not import time) to avoid stale reference.

Type of Change

  • 🚀 Feature (new functionality)

Testing

  • Tests pass locally (pytest)
  • Added/updated tests for changes
  • Manually verified changes work as expected

Checklist

  • Code follows project style (ruff check and ruff format pass)
  • Self-review completed
  • No new warnings introduced

Closes: codemem-yny

Stack: 2/3 (depends on #230)

Copy link
Copy Markdown

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

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: 5a8325e6dd

ℹ️ 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".

Comment thread codemem/viewer_routes/observer_status.py Outdated
Copy link
Copy Markdown
Owner Author

kunickiaj commented Mar 15, 2026

@kunickiaj kunickiaj force-pushed the 03-15-feat_observer_support_anthropic_oauth_for_claude_max_pro_subscriptions branch from a000341 to 6a2f81e Compare March 15, 2026 18:30
@kunickiaj kunickiaj force-pushed the 03-15-feat_add_observer_status_api_endpoint branch from 5a8325e to 657d70f Compare March 15, 2026 18:30
Copy link
Copy Markdown
Owner Author

kunickiaj commented Mar 15, 2026

Merge activity

  • Mar 15, 6:33 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Mar 15, 6:34 PM UTC: Graphite rebased this pull request as part of a merge.
  • Mar 15, 6:36 PM UTC: @kunickiaj merged this pull request with Graphite.

@kunickiaj kunickiaj changed the base branch from 03-15-feat_observer_support_anthropic_oauth_for_claude_max_pro_subscriptions to graphite-base/231 March 15, 2026 18:33
@kunickiaj kunickiaj changed the base branch from graphite-base/231 to main March 15, 2026 18:34
Add endpoint returning resolved observer state (provider, model, auth method,
token presence) and probe_available_credentials() for checking available
credential sources per provider. Enables settings UI to show actual active
auth path.

Closes: codemem-yny
@kunickiaj kunickiaj force-pushed the 03-15-feat_add_observer_status_api_endpoint branch from 657d70f to c909b03 Compare March 15, 2026 18:34
@kunickiaj kunickiaj merged commit 6273e28 into main Mar 15, 2026
8 checks passed
@kunickiaj kunickiaj deleted the 03-15-feat_add_observer_status_api_endpoint branch March 15, 2026 18:36
kunickiaj added a commit that referenced this pull request Mar 15, 2026
## Summary
- Add an observer status banner at the top of the Connection settings panel showing the actual resolved auth state
- Displays active provider, model, auth method (e.g. "OAuth (Claude Max/Pro)"), and token validity
- Shows available credentials per provider (OAuth, API key, env var) with visual indicators
- Fetches from `/api/observer-status` endpoint in parallel with config load

## Type of Change
- [x] New feature

## Testing
- Visual/UI change — verified via build
- 768 tests pass, lint clean

## Checklist
- [x] UI bundle rebuilt (`bun run build`)
- [x] Lint clean
- [x] No secrets or private references

Closes: codemem-4uc
Stack: 3/3 (depends on #231)
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