Skip to content

feat(vault): collapse multi-protocol column to "primary (+N more)" - #10

Merged
damonleelcx merged 1 commit into
develop-v1.0.4from
feat/seats-unseated-reorg-and-vault-protocol-more
Jul 24, 2026
Merged

feat(vault): collapse multi-protocol column to "primary (+N more)"#10
damonleelcx merged 1 commit into
develop-v1.0.4from
feat/seats-unseated-reorg-and-vault-protocol-more

Conversation

@damonleelcx

@damonleelcx damonleelcx commented Jul 24, 2026

Copy link
Copy Markdown

What

The Vault page's 协议 / PROTOCOLS column rendered every protocol a key speaks, comma-joined. A multi-protocol team key renders one row per protocol group, so that list was repeated into each of those rows — overflowing the 22% column and re-stating the group header.

The column now shows the protocol of the group the row is under, plus a (+N more) hint:

openai, anthropic   →   openai (+1)

The full list is still reachable via the cell's title and the detail drawer.

Why it leads with the row's group

Not the key's first protocol. Otherwise the openai row of an anthropic+openai key labels itself anthropic — the same class of bug 20260713-multiprotocol-vk-web-display fixed for the row provider chip. There's a regression test for exactly this.

No behaviour change for single-protocol keys

extraCount is 0 and no hint renders, so single-protocol and legacy (no-bindings) rows are byte-identical to before.

Notes

  • Rule extracted to a pure protocolColumn() helper so it's testable without mounting the 7k-line vault page.
  • New i18n key vault.protocolMore (en + zh).

Test

  • 7 new unit tests, incl. the reported ['anthropic','openai']openai (+1) case, the group-ordering regression, and the empty/legacy fallbacks.
  • Full suite: 273 passed; tsc --noEmit clean.
  • Verified live in Chrome against a local stack (/user/vault), on a team key bound to two protocols across two providers (anthropic/zhipu + openai_compatible/deepseek). The key renders once per group:
    • group openai (codex)openai (+1)
    • group anthropic (claude)anthropic (+1)
    • single-protocol keys in the same list show a bare openai with no hint.

Unrelated deployment bug found while verifying

/user/vault is dead on any server installed by workflow/CD/installer/server-install.sh: its generated nginx config proxies /auth, /team, /system, /local-api but has no location /api, so /api/user/{vault,import}/* falls through try_files to the SPA — GET returns index.html with a 200 (looks fine, parses as empty), POST returns nginx 405. Backend implements the routes (router.go:737). Tracked separately; not part of this PR.

🤖 Generated with Claude Code

A multi-protocol team key renders one row PER protocol group, so spelling
the whole comma-joined protocol list into every one of those rows both
overflowed the 22% PROTOCOLS column and just re-stated the group header.

The column now leads with the protocol of the group the row is rendered
under and folds the remainder into a "(+N more)" hint. The full list stays
reachable via the cell's title attribute and the detail drawer, so nothing
is lost — only the redundancy.

Leading with the ROW'S GROUP (not the key's first protocol) is the part
that matters: otherwise the openai row of an anthropic+openai key labels
itself "anthropic", which is the same class of bug 20260713 fixed for the
row provider chip.

The rule is extracted to a pure `protocolColumn()` helper so it is
unit-testable without mounting the 7k-line vault page. Single-protocol and
legacy (no-bindings) rows are byte-identical to before: extraCount is 0 and
no hint renders.

- New: pages/user/_shared/protocol-column.ts (+ 7 tests)
- i18n: vault.protocolMore in en/zh

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@damonleelcx
damonleelcx merged commit 2330fdd into develop-v1.0.4 Jul 24, 2026
0 of 2 checks passed
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