Skip to content

fix: restore Claude usage session key settings to settings panel - #90

Merged
aterrylu merged 3 commits into
mainfrom
terry/restore-usage-settings
Mar 28, 2026
Merged

fix: restore Claude usage session key settings to settings panel#90
aterrylu merged 3 commits into
mainfrom
terry/restore-usage-settings

Conversation

@aterrylu

Copy link
Copy Markdown
Owner

Summary

  • Re-adds Session Key and Organization ID fields to the settings panel under a "Claude Usage" section header
  • These fields were removed from the UI at some point while the backend plumbing (settings.ts, routes/settings.ts, scanner.ts) remained intact
  • No backend changes needed — the API already reads/writes these fields

Test plan

  • Dashboard builds cleanly
  • Open settings panel → verify "Claude Usage" section appears above "Anthropic API Override"
  • Enter a session key → Save → verify it persists (shown as redacted on reopen)
  • Enter an org ID → Save → verify usage plugin picks it up

🤖 Generated with Claude Code

The Session Key and Organization ID fields were removed from the
settings panel UI at some point, while the backend plumbing (settings.ts,
routes/settings.ts, scanner.ts) remained intact. Re-adds both fields
under a "Claude Usage" section header above the Anthropic API Override.

@nox-0x nox-0x 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.

Clean restore of the Claude Usage settings UI. The two SettingRow additions follow the existing pattern correctly — null-coalescing on read, functional pending state update on write, and secret correctly applied only to the session key. Backend plumbing was already in place, so no surface area concerns. Ship it.

@aterrylu
aterrylu marked this pull request as ready for review March 28, 2026 08:24
- Toggle handler: replace silent catch with error display + console.error
- Toggle handler: surface non-2xx responses instead of ignoring them
- handleSave: log actual error to console for debugging
- Simplify onChange callbacks to expression-bodied form
- Extract button label helpers for readability

@nox-0x nox-0x 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.

Clean update on top of the previous review. The catch blocks now log errors properly and surface HTTP status codes on toggle failures — both real improvements. Helper functions for button labels are a nice touch for readability. No new issues introduced. Ship it.

@aterrylu
aterrylu merged commit cc97771 into main Mar 28, 2026
1 check passed
@aterrylu
aterrylu deleted the terry/restore-usage-settings branch March 28, 2026 08:57
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