Skip to content

fix(web): show the Claude icon for Claude Subscription (OAuth) channels - #12

Merged
AdoreJc merged 1 commit into
fork-mainfrom
hq/T261106-05-claude-oauth-icon
Nov 7, 2026
Merged

AdoreJc merged 1 commit into
fork-mainfrom
hq/T261106-05-claude-oauth-icon

Conversation

@AdoreJc

@AdoreJc AdoreJc commented Nov 7, 2026

Copy link
Copy Markdown
Owner

HQ-Task: T261106-05

Agent

  • Tool: Claude Code (session started by the HQ supervisor session)
  • Tool version: not exposed to the session
  • Model (full id): claude-opus-5-5
  • Host (CLI / IDE / GitHub coding agent / other): other (Claude desktop app, Windows 10)
  • Date (UTC): 2026-11-06

Note: the git user (AdoreJC) is not a historical core developer of this repository. The code in this PR was AI-generated under the user's instructions and is reviewed by the user's HQ supervisor process.

Links

  • Closes # (fork-internal task, no GitHub issue)
  • Related: none

User request

  • Verbatim (HQ task brief):

new-api 前端里 Claude OAuth 渠道(type 64)显示的是 OpenAI/GPT 图标,改成 Claude 图标。

  • Later constraints or corrections from the user (quote, or none): none

Out of scope — refuse

  • Matched: no (Claude Subscription (OAuth) channel type exists only in this fork; this PR targets fork-main, not upstream)
  • If yes, what was told to the user (stop here; do not open a PR): n/a

Open gate — do not open unless all are satisfied

  • Out of scope (including pass-through-only forwarding): no
  • Usage / configuration / integration (answered instead of opening): no
  • Required issue facts present without invention: yes (from the HQ brief and the code on fork-main 80deef0)
  • Verification is actual commands or steps and observed results, not only go build or tests passed: yes
  • Body is short and factual; no unfiltered AI-generated text: yes
  • Open: yes
  • If no, what was told to the user (stop here): n/a

Kind

  • Bug fix
  • New feature
  • Performance / refactor
  • Docs
  • Other:

Issue facts

  • Actual behavior: channels of type 64 (Claude Subscription (OAuth)) show the OpenAI logo in the channel list, the channel type picker and the channel drawer.
  • Impact: cosmetic; OAuth Claude channels look like OpenAI channels.
  • Frequency: always, for every type 64 channel.
  • Evidence that the problem is in new-api: getChannelTypeIcon has no entry for 64 and returns the 'OpenAI' fallback; getChannelTypeConfig(64) returns the icon: 'openai' fallback.
  • Applicable types and their fields: frontend only; relay / billing / deployment not applicable.

Change

  • getChannelTypeIcon: add 64: 'Claude' next to Anthropic (14).
  • CHANNEL_TYPE_CONFIGS: add a 64 entry (id, name: CHANNEL_TYPES[64], icon: 'anthropic', same icon as 14). Hints are left out because the Anthropic sk-ant-... key hint does not apply to OAuth credentials; no caller reads hints for 64 (the drawer only reads hints.baseUrl for vLLM/SGLang).

Research

Duplicate / prior art

  • Search queries (issues, PRs): none in this fork; type 64 is fork-only.
  • What already existed and why this is not a duplicate: n/a

Docs and code

  • https://docs.newapi.ai/ : not applicable (fork-only channel type)
  • https://deepwiki.com/QuantumNous/new-api : not applicable
  • README / repo docs: not applicable
  • Code paths and what they imply for this change: every channel-type logo goes through getChannelTypeIcon (ChannelTypeLogo in channel-type-badge.tsx, used by channels-table.tsx, channel-mutate-drawer.tsx, channel-provider-picker.tsx; channels-columns.tsx calls it directly). web/src/features/subscriptions shows the bound account only as a text label (boundAccountLabelKey), no channel icon. Codex (57) has no entry and keeps the 'OpenAI' fallback, which is the intended icon.

Alternatives considered

  • Option A: change the fallback icon. Rejected: would change every unmapped type.
  • Option B: map 64 explicitly (this PR).
  • Why this approach: smallest change, matches how 14 is mapped.

Files

Path Why
web/src/features/channels/lib/channel-utils.ts map 64 to the Claude icon
web/src/features/channels/lib/channel-type-config.ts add the 64 config entry with the Anthropic icon
web/src/features/channels/lib/__tests__/channel-type-options.test.ts regression cases for 64

Behavior

  • Before: type 64 channels show the OpenAI logo.
  • After: type 64 channels show the Claude logo, same as Anthropic (14).
  • Explicit non-goals / leftover work: no other channel type changes.

Verification

  • Commands and results (in web/, bun on Windows):
    • bun install --frozen-lockfile: 1213 packages installed
    • bun x --package @typescript/native-preview tsgo -b: exit 0, no errors
    • bun x vitest run src/features/channels/lib/__tests__/channel-type-options.test.ts: 4 passed (4)
    • bun run test: Test Files 212 passed, Tests 2532 passed (2532). A first full run had 1 failure in src/features/task-plugins/__tests__/marketplace-install-dialog.test.tsx (expect(install).toBeEnabled()), unrelated to this change; it passed on the rerun.
    • bun x oxlint -c .oxlintrc.json <3 changed files>: exit 0
    • bun x oxfmt --check <3 changed files>: all files use the correct format
    • bun run build: exit 0
  • Manual steps and observed result: none
  • UI: screenshot or recording (or why none): none; not checked in a browser
  • Tests added or updated, or why none: getChannelTypeIcon(64) === 'Claude' (equal to 14); getChannelTypeConfig(64).icon === getChannelTypeConfig(14).icon; name is Claude Subscription (OAuth).
  • Databases / providers / platforms exercised: none (frontend only)
  • Not verified: visual check in a browser

Risks

  • Failure modes: none expected; display only.
  • Billing / quota / auth impact: none
  • Follow-ups: none

Scope check

  • Single focused change: yes
  • Secrets included: no
  • Out of scope (Coding Plan / reverse-engineered channel / third-party wrapper / Codex / pass-through-only forwarding): no

🤖 Generated with Claude Code

Channel type 64 (Claude Subscription (OAuth)) had no entry in
getChannelTypeIcon's TYPE_TO_ICON map or in CHANNEL_TYPE_CONFIGS, so both
fell back to the OpenAI icon. The channel list, the channel type picker and
the mutate drawer all render the logo through getChannelTypeIcon, so these
OAuth channels showed the OpenAI/GPT logo.

- channel-utils.ts: map 64 to 'Claude', same as Anthropic (14).
- channel-type-config.ts: add a 64 entry with the Anthropic icon and the
  CHANNEL_TYPES name. No key/model hints: the Anthropic "sk-ant-..." key
  hint does not apply to OAuth credentials.
- Tests: assert type 64 maps to the Claude icon and shares the Anthropic
  config icon.

HQ-Task: T261106-05

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@AdoreJc
AdoreJc merged commit e356b44 into fork-main Nov 7, 2026
2 checks passed
@AdoreJc
AdoreJc deleted the hq/T261106-05-claude-oauth-icon branch November 14, 2026 10:59
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