Skip to content

Refine Claude Team seat tier display#1965

Open
hegelty wants to merge 1 commit into
steipete:mainfrom
hegelty:agent/claude-team-seat-tier
Open

Refine Claude Team seat tier display#1965
hegelty wants to merge 1 commit into
steipete:mainfrom
hegelty:agent/claude-team-seat-tier

Conversation

@hegelty

@hegelty hegelty commented Jul 7, 2026

Copy link
Copy Markdown

Summary

  • parse Claude web account membership seat_tier values for Team Standard and Team Premium display
  • refine generic Claude Team labels only inside the existing Claude web-extras/web usage path, preserving the OAuth/CLI source boundary
  • keep primary OAuth/CLI identity fields unchanged when web metadata is used only for plan label refinement

Security/source-boundary fix

  • The PR no longer performs an account-only /api/account lookup before the web-extras gate.
  • OAuth/CLI paths with web extras disabled do not read Claude web cookies or backfill web account email.
  • Added regression coverage for the disabled-web-extras path to keep the generic Claude Team label and leave accountEmail unchanged.

Validation

  • DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer swift build
  • DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer swift test --filter 'ClaudePlanResolverTests|ClaudeWebUsageExtraWindowTests|oauth team login method is not refined when web extras are disabled'

Notes

I only have access to a Claude Team Premium account. Team Standard is covered by unit tests using the observed seat_tier value, but the actual UI display should still be verified with a real Team Standard account.

@hegelty hegelty closed this Jul 7, 2026
@hegelty hegelty deleted the agent/claude-team-seat-tier branch July 7, 2026 04:48
@hegelty hegelty restored the agent/claude-team-seat-tier branch July 7, 2026 04:48
@hegelty hegelty reopened this Jul 7, 2026
@clawsweeper

clawsweeper Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codex review: needs real behavior proof before merge. Reviewed July 7, 2026, 2:50 AM ET / 06:50 UTC.

Summary
The branch parses Claude web account seat_tier values, maps Team Standard/Premium labels, gates OAuth/CLI label refinement behind web extras with same-email checking, and adds focused parser/source-boundary tests.

Reproducibility: not applicable. for this feature PR. Source review shows the added path remains web-extras-gated; the unresolved check is live Team Standard proof, not a current-main bug reproduction.

Review metrics: 2 noteworthy metrics.

  • Changed files: 3 production, 3 test files. The PR touches Claude account parsing and runtime web-extras merge behavior, not only display tests.
  • Prior blockers addressed: 2 prior P1 findings no longer present. The latest head keeps account lookup behind web extras and preserves primary identity fields while adding same-email refinement checks.

Merge readiness
Overall: 🦐 gold shrimp
Proof: 🦐 gold shrimp
Patch quality: 🦞 diamond lobster
Result: blocked until stronger real behavior proof is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P1] Add redacted real Claude Team Standard proof showing the after-fix label in the app or equivalent live output.
  • Update the PR body with the proof; if ClawSweeper does not re-review automatically, ask a maintainer to comment @clawsweeper re-review.

Proof guidance:

  • [P1] Needs stronger real behavior proof before merge: Insufficient: available proof is Premium-only/partial screenshot context, while the PR body says Team Standard still needs real UI verification; add redacted Standard proof and update the PR body to trigger re-review.

Risk before merge

  • [P1] Team Standard behavior is still covered by synthetic parser tests only; the PR body says a real Team Standard account UI/display path has not been verified.
  • [P1] When web extras are enabled, a generic OAuth/CLI Claude Team display label can be refined from Claude web account metadata, so maintainers should explicitly accept that provider-source boundary before merge.

Maintainer options:

  1. Require Standard proof before merge (recommended)
    Keep the current gated implementation but wait for redacted real Claude Team Standard evidence because that is the unproven provider response path.
  2. Accept the proof risk
    Maintainers can intentionally merge with Team Premium real proof plus Standard parser tests, accepting that live Standard metadata might differ.
  3. Pause cross-source refinement
    If the OAuth/CLI plus web-extras source boundary is still uncomfortable, pause this branch or reduce it to web-primary parser support.

Next step before merge

  • [P1] Manual follow-up is needed because automation cannot supply real Claude Team Standard account proof or decide whether to accept synthetic-only Standard coverage.

Maintainer decision needed

  • Question: Should this PR wait for real Claude Team Standard behavior proof, or may unit-test-only Standard coverage be accepted for this provider display change?
  • Rationale: Automation cannot produce a real Claude Team Standard account response, and accepting synthetic-only coverage for a provider/account display path is a maintainer proof-risk choice.
  • Likely owner: steipete — The most recent Claude OAuth/source-boundary history and repository ownership point to steipete for this provider proof and boundary decision.
  • Options:
    • Require Standard proof (recommended): Ask for a redacted real Team Standard screenshot, recording, terminal output, or live log showing the after-fix label before merge.
    • Accept synthetic Standard coverage: Merge with Premium-only real proof plus parser tests, while owning the risk that the live Team Standard response differs from the observed fixture.
    • Narrow the scope: Land only the pure web-account parser/tests and defer OAuth/CLI label refinement until there is stronger live proof or product direction.

Security
Cleared: No concrete security or supply-chain concern remains; current head keeps web metadata refinement behind the existing web-extras path and preserves primary identity fields.

Review details

Best possible solution:

Land the gated seat-tier refinement after redacted Team Standard real-account proof confirms the display, while keeping web metadata refinement inside the existing web-extras path.

Do we have a high-confidence way to reproduce the issue?

Not applicable for this feature PR. Source review shows the added path remains web-extras-gated; the unresolved check is live Team Standard proof, not a current-main bug reproduction.

Is this the best way to solve the issue?

Yes, the current implementation is a narrow maintainable path for the label refinement. It is not merge-ready until maintainers either require or waive real Team Standard proof.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 46edb383c0ac.

Label changes

Label justifications:

  • P2: This is a normal-priority Claude provider display improvement with limited blast radius and a remaining proof gap.
  • merge-risk: 🚨 auth-provider: The PR can derive an OAuth/CLI generic Claude Team display label from Claude web account metadata when web extras are enabled.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦞 diamond lobster.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: Insufficient: available proof is Premium-only/partial screenshot context, while the PR body says Team Standard still needs real UI verification; add redacted Standard proof and update the PR body to trigger re-review.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. Insufficient: available proof is Premium-only/partial screenshot context, while the PR body says Team Standard still needs real UI verification; add redacted Standard proof and update the PR body to trigger re-review.
Evidence reviewed

What I checked:

Likely related people:

  • steipete: Recent Claude OAuth/source-boundary and release-adjacent commits touch the usage fetcher and plan resolver surfaces affected by this PR. (role: recent area contributor; confidence: high; commits: 275c195be3fe, c57de22c9ffe, 92bbb7a67073; files: Sources/CodexBarCore/Providers/Claude/ClaudeUsageFetcher.swift, Sources/CodexBarCore/Providers/Claude/ClaudePlan.swift)
  • Ratul Sarna: Introduced the central Claude plan inference abstraction that this PR extends for web account seat tiers. (role: feature-history contributor; confidence: medium; commits: 4beddde4b7e0; files: Sources/CodexBarCore/Providers/Claude/ClaudePlan.swift, Tests/CodexBarTests/ClaudePlanResolverTests.swift)
  • pickaxe: Recently changed Claude web session/account-fetch plumbing adjacent to the account parser path modified here. (role: recent web-account contributor; confidence: medium; commits: eafe68b96611; files: Sources/CodexBarCore/Providers/Claude/ClaudeWeb/ClaudeWebAPIFetcher.swift)
  • Heejin Jung: Recently changed Claude plan-label formatting and resolver tests adjacent to this seat-tier display refinement. (role: adjacent plan-label contributor; confidence: medium; commits: 8021ed86d5cd; files: Sources/CodexBarCore/Providers/Claude/ClaudePlan.swift, Tests/CodexBarTests/ClaudePlanResolverTests.swift)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (3 earlier review cycles)
  • reviewed 2026-07-07T04:56:25.956Z sha 307ee65 :: needs real behavior proof before merge. :: [P1] Keep web plan refinement behind web extras | [P1] Preserve the primary account identity
  • reviewed 2026-07-07T05:19:38.041Z sha 68bbd51 :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-07T05:29:42.163Z sha 68bbd51 :: needs real behavior proof before merge. :: none

@clawsweeper clawsweeper Bot added proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. merge-risk: 🚨 auth-provider 🚨 Merging this PR could break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. labels Jul 7, 2026
@hegelty hegelty force-pushed the agent/claude-team-seat-tier branch from 307ee65 to 68bbd51 Compare July 7, 2026 05:14
@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. labels Jul 7, 2026
@hegelty hegelty marked this pull request as ready for review July 7, 2026 05:24

@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: 68bbd51253

ℹ️ 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 Sources/CodexBarCore/Providers/Claude/ClaudeUsageFetcher.swift Outdated
@hegelty hegelty force-pushed the agent/claude-team-seat-tier branch from 68bbd51 to 7b305b3 Compare July 7, 2026 06:45

@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: 7b305b3a6a

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

let webText = web?.trimmingCharacters(in: .whitespacesAndNewlines)
guard let webText, !webText.isEmpty else { return current }
guard self.isGenericTeamLoginMethod(current) else { return current }
guard self.isSameAccountEmail(currentAccountEmail, webAccountEmail) else { return current }

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 Include organization in Team tier refinement

Fresh evidence: this version now verifies only the email before accepting the web seat label. For a Claude user who belongs to multiple Team orgs under the same email, the web extras path can be pointed at or auto-select one organization while the primary CLI snapshot still carries another accountOrganization; this guard then accepts the web tier and the merge keeps the primary organization, producing an Org A label with a Standard/Premium tier sourced from Org B. Compare the primary/web organization as well, or skip refinement when the primary org is known and differs.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 auth-provider 🚨 Merging this PR could break OAuth, tokens, provider routing, model choice, or credentials. P2 Normal priority bug or improvement with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant