Skip to content

feat(frontends): close Phase 1+2 backend-frontend capability gaps - #379

Merged
voidvec merged 20 commits into
masterfrom
feat/frontend-gap-phase12
Nov 27, 2026
Merged

voidvec merged 20 commits into
masterfrom
feat/frontend-gap-phase12

Conversation

@voidvec

@voidvec voidvec commented Nov 27, 2026

Copy link
Copy Markdown
Owner

Summary

Closes the Phase 1 + Phase 2 backend-to-frontend capability gaps across frontends/user and frontends/admin, aligns apps/server/openapi.yaml (and regenerated Python/Go/TS SDKs) for GET /api/admin/tokens, and enforces user→admin error catalog mirroring in CI.

Highlights

  • User portal (frontends/user)
    • UF-01 / UF-03 (198a7abc, 13de5a1d): Passkey sign-in flow (POST /oauth2/webauthn/authenticate/{begin,finish}, wired into existing authorizeResume) and per-credential deletion (DELETE /api/me/webauthn/credentials/{credentialId}).
    • UF-04a (fb626add, 13de5a1d): Self-registered application editing via partial PATCH /api/me/applications/{clientId} (sends dirty fields only; surfaces suspended-app guard).
    • UF-04b / UF-04c (bed4880f): Organization owner selector & allowed_grant_types selection at application creation; personal ↔ organization transfer (POST .../transfer).
    • UF-02 (2142d7d5): Pending organization invitations list (GET .../invitations) and row-level revocation (DELETE .../invitations/{invitationId}) for owners/admins.
    • UF-05 (94f2d06c): Self-service resend-verification panel (POST /api/verify-email/resend-by-email) when password sign-in is blocked by unverified email (403 AUTHZ_ACCESS_DENIED).
    • UF-07 (440fc0c1, a54989c3): Organization consent-request withdrawal (DELETE .../consent-requests/{id}) right after filing and from the manager approval queue for one's own request.
    • UF-08 (d5b1eb26, 56514f87): Localized copy for AUTH_SOCIAL_ACCOUNT_NOT_LINKED (with link-account guidance), WEBAUTHN_INVALID_ATTESTATION, and WEBAUTHN_CHALLENGE_MISMATCH.
  • Admin console (frontends/admin)
    • AF-01 frontend half (ad16075e, 5f92e53a): Permission-aware console for delegated accounts — requests resource scopes at login, probes readable domains to converge navigation and landing route, and gates users write actions on users:write. Server-side fulla-admin-console allowed_scopes widening is tracked separately in config(authz): widen fulla-admin-console allowed_scopes for delegated admin sign-in (AF-01) #375.
    • AF-02 / AF-03 (aafdae3b): Role catalog drives the users role filter, create-user role checkboxes, and role assignment checkboxes (preserving out-of-catalog roles read-only); adds must_change_password option to user creation.
    • AF-05 (e9d453d2): Full audit log CSV export opt-in (all=true).
  • Contract / CI / Hygiene
    • BE-01 (362a38c2): Documents page, per_page, client_id, and user_id query parameters on GET /api/admin/tokens in apps/server/openapi.yaml and regenerates the Python/Go/TypeScript SDKs.
    • Error catalog mirror gate (d5b1eb26, ba1ce747): Extends scripts/check-ui-sync.mjs to enforce verbatim user→admin error catalog mirroring (replacing the non-functional cross-app dynamic import fallback in crossAppConsistency.property.test.ts).
    • Bundle-size gate re-baseline (0c672355): Re-baselines the four frontend size limits to measured values after verifying every chunk delta is feature code/copy.
    • E2E & .gitignore fixes (a54989c3, 4a35b129): Fixes /api/me wait order in open-platform.spec.ts, strict-mode row locator in claim-mappings.spec.ts, and updates the stale !OAuth2Admin/src/pages/logs/ .gitignore exception to !frontends/admin/src/pages/logs/.

Notes for reviewers & consumers

  • Go SDK source-incompatible change: Regenerating from the updated GET /api/admin/tokens OpenAPI parameters adds a params *GetApiAdminTokensParams argument to Client.GetApiAdminTokens in clients/go. No in-repo callers exist; external Go SDK consumers calling GetApiAdminTokens will need to pass nil or a &GetApiAdminTokensParams{...} struct.
  • AF-01 follow-up (config(authz): widen fulla-admin-console allowed_scopes for delegated admin sign-in (AF-01) #375): End-to-end delegated admin login requires widening fulla-admin-console.allowed_scopes in server configs (and deciding per-environment rbac_rules); tracked in config(authz): widen fulla-admin-console allowed_scopes for delegated admin sign-in (AF-01) #375.
  • Known scope notes: Passkey login (UF-01) was verified via unit tests and mocked E2E (not a physical authenticator); must_change_password creation (AF-03) asserts the request payload while the sign-in side is covered by the existing forced-password-change spec; UF-07 covers immediate post-filing and manager-queue withdrawal (plain members cannot recover a request ID after reload without a backend "my requests" endpoint); T2.1 renders expires_at verbatim via shortDateTime() (server-local timestamp without timezone).

Local verification

  • frontends/user: npm run test:unit (14 files / 67 passed), npm run test:e2e (190 passed / 2 skipped), npm run lint (0 errors), npm run build (OK)
  • frontends/admin: npm run test:unit (3 files / 19 passed), npm run test:e2e (231 passed / 6 skipped), npm run lint (0 errors), npm run build (OK)
  • Root gates: node scripts/check-ui-sync.mjs (13 UI components + 106 error catalog entries in sync), node scripts/check-frontend-size.mjs (OK)

Type of change

  • Bug fix (non-breaking)
  • New feature (non-breaking)
  • Breaking change (API, config, or protocol surface) — Go SDK Client.GetApiAdminTokens signature adds params (regenerated from documented OpenAPI query params)
  • Docs / tests / CI only

Checklist

General:

  • Tests added or updated; full suite green locally (or N/A — say why)
  • CHANGELOG.md entry added (user-visible changes)
  • Docs updated (incl. website/i18n/zh-CN mirrors when docs/ content changed) — docs/contribute/frontend-i18n.md and .claude/rules/frontend-contract.md updated; zh-CN mirror sync can follow if required

If this touches the API surface (skip otherwise):

  • OpenAPI spec kept in sync (authoritative apps/server/openapi.yaml and its mirror points) — GET /api/admin/tokens query params documented; Swagger UI C++ registration unchanged
  • Error codes synced at all five points (spec, catalog test, SDKs where applicable) — existing backend codes added to frontend catalogs and enforced by check-ui-sync.mjs
  • Endpoint fingerprints / golden baselines regenerated if endpoints changed (N/A — no endpoints added/removed)
  • api-diff and oasdiff gates addressed (additive optional query parameters only)
  • Breaking changes curated into the Breaking changes section of CHANGELOG.md

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-27T02:07:22.845103Z 4a35b12 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: 4a35b12996

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

@voidvec

voidvec commented Nov 27, 2026

Copy link
Copy Markdown
Owner Author

PR 评审:阻碍合入项清单

基于当前 head 4a35b129 的代码与 CI 核查,以下问题阻碍合入:

1. [CI 门禁失败] Website / build(llms.txt freshness gate)未通过,且中文镜像文档存在漂移

  • 证据:Run 45926197445(Job 140267955200)执行 node scripts/gen-llms-txt.mjs 后检测到 website/static/llms-full.txt 存在 1 行未同步差异(本 PR 修改了 docs/contribute/frontend-i18n.md,但未重新生成该文件)。
  • 关联文档漂移:website/i18n/zh-CN/docusaurus-plugin-content-docs/current/contribute/frontend-i18n.md:78 仍保留旧描述(称 crossAppConsistency.property.test.ts 断言两应用对同一 (code, locale) 产出相同消息),未与英文版 docs/contribute/frontend-i18n.md 同步更新。
  • 修复建议:同步更新上述中文镜像文档,然后运行 node scripts/gen-llms-txt.mjs 并提交更新后的 website/static/llms-full.txt。

2. [功能/契约缺陷] 应用转移目标包含后端明确拒绝的“组织 → 组织”转移

  • 位置:frontends/user/src/pages/account/ApplicationsPage.vue(transferTargets、openTransfer、confirmTransfer)及 frontends/user/tests/e2e/application-ownership.spec.ts、frontends/user/tests/e2e/helpers/mock-api.ts
  • 证据:后端 apps/server/src/openplatform/ApplicationService.cc:1631-1637 在 owner.getOrgId() != nullptr 时对任何非空 org_slug 一律返回 400 VALIDATION_INVALID_INPUT(仅支持个人 ↔ 组织转移,不支持组织 → 组织跨组织转移)。同时 openTransfer() 将 transferTarget 预设为 ownerSlugOf(app),但 transferTargets 已将当前组织过滤掉,导致下拉框初始值不在可选 <option> 列表中;新增 E2E mock 也错误放行了该转移请求。
  • 修复建议:对已归属组织的应用仅提供“转回个人”目标,修正转移弹窗初始选中状态与 E2E mock 契约(或明确同步补齐后端跨组织转移实现)。

3. [功能/权限误导] 非创建者的组织管理员将应用转回个人时,UI 误报为转给当前操作者本人

  • 位置:frontends/user/src/pages/account/ApplicationsPage.vue(confirmTransfer 与转移弹窗)及 frontends/user/src/i18n/{en,zh-CN}.ts
  • 证据:后端 apps/server/src/openplatform/ApplicationService.cc:1579-1601 在转回个人时仅清空 org_id 并保留原 creator_user_id(列表响应已包含 creator_user_id,见 ApplicationService.cc:649)。若由非创建者的组织管理员执行该操作,应用所有权会退回给原创建者,操作者本人会立刻失去管理权限且应用将从其列表消失;但当前 UI 选项与成功提示均宣称“由您本人(个人)管理(you (personal))”。
  • 修复建议:在确认弹窗与成功提示中区分原创建者与当前操作者,明确提示应用将归还给原创建者及当前管理员将失去管理权。

4. [发布规范] Breaking change 与用户可见功能变更未登记 CHANGELOG.md

  • 证据:PR 模板已勾选 Breaking change(Go SDK Client.GetApiAdminTokens / GetApiAdminTokensWithResponse / NewGetApiAdminTokensRequest 新增 params *GetApiAdminTokensParams 参数,属源码不兼容变更),且包含多项用户可见前端新特性,但 PR 清单中两项 CHANGELOG.md 条目均未勾选,且 diff 未包含 CHANGELOG.md 更新。
  • 修复建议:在 CHANGELOG.md 的 [Unreleased] 节下补充 Breaking changes 与 Added 条目。

5. [合入策略] 缺少外部审阅批准(REVIEW_REQUIRED)

  • 当前仅有 Codex 自动评论,尚无具备权限的外部审阅者 Approve。

非阻碍改进建议:frontends/user/src/pages/account/ApplicationsPage.vue 的编辑应用弹窗未像创建表单那样对 PUBLIC 客户端禁用 client_credentials 复选框(后端 apps/server/src/openplatform/ApplicationService.cc:396 会校验拒绝并返回 400),建议顺手对齐。

wangrh0909
wangrh0909 previously approved these changes Nov 27, 2026
@voidvec
voidvec force-pushed the feat/frontend-gap-phase12 branch from 4a35b12 to a9ae181 Compare November 27, 2026 08:11
…F-03)

Passkey login (T1.1): a 'Sign in with a passkey' entry on the login page
drives POST /oauth2/webauthn/authenticate/begin (session-carried cookies)
-> navigator.credentials.get() -> /finish with the WebAuthnAssertionCredential
contract shape. Conversions live in the new webauthnService.ts as pure
functions (vitest-pinned round-trips); the finish response establishes the
browser session, so a plain portal login completes through the SPA's own
authorize round-trip (buildOwnAuthorizeUrl + PKCE stash) and an in-flight
authorize request resumes through the existing rebuild. Every server failure
surfaces as the generic AUTH_INVALID_CREDENTIALS copy (anti-enumeration);
browser DOMExceptions (no axios response) get local copy instead of the
network-fallback misreport.

Passkey delete (T1.2): each registered credential row gains a delete action
behind the shared confirm dialog; deleting the last passkey is allowed
(P0-7), the anti-enumeration 404 renders the generic not-found copy.

Also aligns the register/finish e2e mock with the real #142 contract — the
old mock still demanded the retired credential_id/public_key fields and
answered every real-shaped POST with 400 (mock drift, plan risk R3).

New endpoints consumed: /oauth2/webauthn/authenticate/{begin,finish},
DELETE /api/me/webauthn/credentials/{credentialId}. i18n: en/zh-CN parity.
Covers UF-01 (P1) and UF-03 (P1) of the 2026-11-16 frontend gap plan.
Edit modal on the applications page driving PATCH
/api/me/applications/{clientId} with ONLY the dirty fields — absent keys
stay unchanged per contract (minProperties 1); a name-only edit sends
exactly {name} (e2e-asserted). redirect_uris validate like the backend
(https-only, loopback exempt) before anything is sent; allowed_grant_types
render as checkboxes over the server's value domain (authorization_code,
refresh_token, client_credentials CONFIDENTIAL-only, device_code) and
cannot be emptied. scopes/logo_uri are absent from the list response, so
they are send-only-when-typed (blank keeps the stored value) and logo_uri
has an explicit clear checkbox (empty string is the contract's clear
sentinel). A suspended application disables its edit entry with a frozen
tooltip; a raced 403 renders the catalog copy.

Covers UF-04a (P1) of the 2026-11-16 frontend gap plan.
…frontend half)

The console used to admit an account only when userinfo listed the
literal admin role, so the delegated roles the backend's P1-8 permission
model allows (a helpdesk role holding users:read, say) were thrown out at
sign-in no matter what the server would have let them do.

The gate is now what the account can actually read. The admin role keeps a
fast path with no extra requests and no behaviour change. Any other
account probes each console domain right after the session is established
(landing page and on reload): a GET on the domain's list endpoint decides
whether its menu entry renders, and for the users domain a validation-first
POST /api/admin/users with an empty object decides whether the write
actions are enabled (400 = reached the handler, 403 = scope gate refused;
nothing is written or audited on either path). Sections with nothing left
disappear; the breadcrumb root and the logo stop pointing at a dashboard
the account cannot read; a delegate lands on its first readable domain. An
account that can read nothing is refused exactly as before.

Write gating covers the users domain only (list page and detail page);
other domains hide when unreadable and otherwise leave their write buttons
to the backend's 403.

Sign-in now requests the nine P1-8 resource scopes alongside admin.
/oauth2/login evaluates scopes one by one and drops the ones the client
allowlist or the account's permissions do not cover, so this is a no-op
where they are not allowed. It matters because a delegated account is only
issued the resource scopes it asks for, and the probes can only see what
the token carries.

Known limit, not addressed here: the shipped fulla-admin-console client
allows only openid/profile/admin, so under the shipped config a delegated
account still signs in with no admin-class scope and is refused. End-to-end
delegated sign-in needs that client's allowlist widened server-side (and,
on existing deployments, the scope rows added, since the seeder never
touches a client row it already created). That is an operator decision and
is left out of this change.

Tests: unit tests pin the store's decisions per account shape; a new e2e
spec covers the delegated shapes against mocked 403s; the existing
non-admin denial spec now models the backend's refusal of the admin
surface, which it had never needed while the gate was role-based. The
mocked POST /api/admin/users now rejects a body without username/password
with 400, as the real handler does.
…BE-01)

The handler (TokenManagementService::listTokens) has always read page,
per_page, client_id and user_id, and the admin console already sends them
to filter and paginate, but the spec recorded none of them. Anyone taking
the spec as the source of truth would conclude the parameters are unused.

Adds the four optional query parameters in the style the users list
already uses, and spells out what the handler actually does: active tokens
only (not expired, not revoked), newest first, filters combined with AND,
per_page capped at 100 with 50 as the default.

No behaviour change and nothing breaking: the parameters were already
accepted. apps/server/docs/api/openapi.json is untouched because it is
produced from the C++ document registry, which this change does not touch.

Regenerates the committed client SDKs, as the drift gate requires after
any spec change. Note for Go callers: Client.GetApiAdminTokens gains a
*GetApiAdminTokensParams argument before the request editors, so existing
calls need a nil or a params value passed through.
…their flows

The specs added with UF-01/UF-03 and UF-04a had not been run before they
were committed. Run, four of them failed, and each failure was in the
spec rather than in the feature:

- The applications mock was registered on '**/api/me/applications*'. A
  single star does not cross '/', so the per-application PATCH never
  reached the handler and fell through to the network. The glob is now
  '**' and covers sub-paths.
- The WebAuthn stub closed over a parameter of the helper that built it.
  page.addInitScript re-evaluates the function's source in the page, where
  that free variable does not exist, so the stub was never installed and
  the real browser API ran. The stub is now self-contained.
- The successful-login spec only asserted that the page was no longer
  /login, and its userHandle check looked under response instead of at
  the credential's top level, so neither proved much. It now waits for the
  portal root and checks that the exchange persisted a refresh token, and
  asserts userHandle is a base64url string.

One product change came out of it: the edit confirmation named the
application by its previous name after a rename; it now uses the
submitted one.
… gate

The admin error catalogs are supposed to mirror every entry of the user
catalogs. Nothing checked that. The test named for it,
crossAppConsistency.property.test.ts, tries to import the admin entry at
runtime, but test files must never import across apps
(.claude/rules/frontend-contract.md), and the import does not resolve: it
falls back to comparing the user catalog with itself and passes. Verified
by mutation: breaking an admin message left all of its cases green, so a
code added to the user app and forgotten in the admin app shipped as
'unknown error' there, which is how the three UF-08 codes went missing.

scripts/check-ui-sync.mjs now has a second section. It reads the four
catalog files and requires every user entry to be in the admin catalog
with the identical literal, per locale. Entries are compared as written,
line by line, and a line it cannot read fails the gate instead of being
skipped, so the check cannot shrink quietly. Admin-only codes are listed
but not judged. The same mutation that passed the vitest property fails
here with exit 1.

The step's place in the workflow is unchanged; only its name and comment
are, to say what it now covers. The frontend-i18n doc and the rule file
said the property test asserted cross-app equality; they now point at the
gate.
…-08)

Three codes the backend can answer a portal user had no catalog entry, so
they rendered as 'An unexpected error occurred':

- AUTH_SOCIAL_ACCOUNT_NOT_LINKED: signing in with a provider identity that
  has no local account.
- WEBAUTHN_INVALID_ATTESTATION and WEBAUTHN_CHALLENGE_MISMATCH: a passkey
  registration the server refuses.

Added to both apps and both locales with identical copy. The social
callback pages now also offer the way forward for the not-linked case: a
link to the security page, where the account can be linked.

With the catalog complete for portal users, the property test's list of
backend codes is replaced by the full set (32) and a check is added that
each of them resolves to real copy rather than the unknown-code fallback,
in both locales. The earlier 18-code list predated most of the codes
added since; removing a code from the catalog did not fail anything. The
codes deliberately left out are listed with their reason.

Verified by mutation: removing one of the new codes fails the new check
by name.
With auth.require_email_verification on (the shipped production config), an
account whose address is not verified is refused at sign-in with 403
AUTHZ_ACCESS_DENIED. The page showed the catalog's bare 'Access denied' and
nothing else, so the user was locked out with no way to help themselves,
even though the backend has an anonymous resend-by-email endpoint built for
exactly this.

A refused sign-in now shows a panel that asks for the address and requests
a new link through POST /api/verify-email/resend-by-email. The sign-in
field takes a username as well, so the typed value is carried over only
when it is an address. The confirmation is the server's own wording and is
shown whatever the address: unknown, already-verified and mailed addresses
answer identically, and the page keeps that property rather than guessing.
A rate-limited request (429) shows the catalog copy.

The code alone is the discriminator. /oauth2/login answers that one case
with AUTHZ_ACCESS_DENIED and nothing else on the path does (the
organization gate answers VALIDATION_INVALID_INPUT or AUTH_MFA_REQUIRED),
and the frontend keeps only the code, never the server's message, so there
is no text coupling.
An invitation could be created but never seen again: there was no list and
no revoke, so an address typed wrong kept its seat for the whole 72-hour
window and the one-time token, missed once, could only be replaced by
inviting again.

The members panel now shows the organization's pending invitations for
its owner and admin (email, role, expiry) through GET
/api/me/organizations/{slug}/invitations, each with a revoke behind the
shared confirm dialog (DELETE .../invitations/{id}). The list loads with
the panel, and refreshes after an invite or a revoke. A plain member's
panel never asks for it.

The expiry is shown as the server reports it, cut to date and minutes.
expires_at is a server-local timestamp with no time zone, so the page
cannot know when it really lapses and does not pretend to: no countdown,
no expired flag. The list also includes invitations that have already
lapsed, since the server only filters out accepted ones. Both would need
the backend to send an offset or an epoch value.

The one-time token is now labelled as such: it was described only as
something to hand to the invitee.
…ater (UF-04b, UF-04c)

An application was always created under the personal account, with the
server's default grant types, and could never move: the create form sent
neither org_slug nor allowed_grant_types, and nothing called the transfer
endpoint. An application built for a team stayed personal for good.

The create form now has an owner (the account itself, or an organization
where the caller is owner/admin — the only anchors the server accepts) and
grant-type checkboxes that send what they show. authorization_code is the
initial state, matching the server's default. client_credentials needs a
secret a PUBLIC client cannot hold, so it is not offered for that type and
is dropped when the type changes. At least one type stays selected, since
the server rejects an empty list.

Each application can then be transferred through POST
/api/me/applications/{clientId}/transfer. The dialog pre-selects the
current owner and keeps its submit disabled until another one is chosen, so
confirming without choosing cannot move anything. Moving back to personal
sends org_slug: null, with the key present as the contract requires. A
suspended application is frozen for transfer like for every other
management write.

The cards now say who manages each application. The list carries only an
organization id, so the name is looked up in the caller's organizations,
which are loaded once per page; that request is quiet on failure because
the names are decoration, and the actions that need the list report it.
With no managed organization, the transfer dialog says so instead of
offering a single, already-selected option.
…password change (AF-02, AF-03)

Three gaps on the user management page:

- The role filter and the role hints named exactly admin and user, so a
  custom role could not be filtered for, and both the create form and the
  assignment dialog took role names as free text. A typo was only caught
  by the server, after submit. All three now read GET /api/admin/roles.
  The dialog checks the roles the user already holds (the list rows carry
  them) and sends what ends up checked; the create form sends nothing when
  no role is checked, so the server's default still applies.
- A role the user holds that the catalog does not list — a stale catalog,
  or one a delegated account cannot read — is shown checked and locked
  and is sent back unchanged. Dropping it silently would have taken it
  away. Only the admin role may read the catalog under the shipped rules;
  without it the filter falls back to the two built-in names and the
  dialogs say the list is unavailable.
- The create form had no must_change_password option, so an account created
  on someone's behalf could not be made to replace its password at first
  sign-in, although the server has that whole flow. The flag is sent only
  when checked.

The assignment specs are rewritten for checkboxes. The one for a refused
role keeps its point with the way it can still happen: a catalog that went
stale between loading and saving. The mocked user rows now carry roles, as
the real list does.

Not covered end to end here: an account created with the flag actually
landing on the forced-change screen at sign-in. The API-mocked suites
assert the flag on the wire, and the sign-in side is covered by the
forced-password-change specs; the link between them needs a running
backend.
A member who filed an authorization request for the wrong application could
only wait for a manager to reject it, although the backend has let the
requester withdraw their own pending request since v1.6.

Two places, because that is as far as the frontend can see:

- Right after filing. The request dialog used to close on success. It now
  stays on a filed state with the server's message, a Withdraw button and
  Done, and calls DELETE
  /api/me/organizations/{slug}/consent-requests/{id}.
- In the approval queue, for a manager: a row the signed-in user filed
  themselves gets a Withdraw button next to approve and reject.

What this does not solve: a plain member who closes the dialog has no way
to find the request again. Listing requests is for managers only, so the
filing response is the one time a member is told the id. That needs a list
of the member's own requests on the backend; nothing client-side can
recover it after a reload.

Rows are recognised as the user's by requester_username against the
profile, the only identifier the two share (usernames are unique). The
server still decides: anyone else's id answers the same 404 as an unknown
one.
The export button always sent a time window — the filled-in one, or the
last 24 hours when the inputs were empty. An audit of everything meant
widening the window by hand. The server has accepted all=true for a full
export since P1-6.

A 'Whole log' checkbox sends all=true instead of from/to. The other
filters still ride along, and the row cap still applies: the hint says so,
and an over-cap export is refused with the catalog's message as before.
The file is named audit-export-all.csv so it cannot be mistaken for a
windowed one.
An unused catch binding in the permissions store, and a variable captured
but never asserted in a users spec.
…ation

The gate failed on this branch: user.main 171.7KB against a 170.7KB cap and
admin.total 503.6KB against 501.6KB.

Measured against master built in the same place (user 428.3/162.5KB, admin
495.5/168.1KB — the same numbers CI reports for master), this branch adds
user +30.3KB total and +9.2KB main, admin +8.1KB total and +3.4KB main.
The per-chunk comparison accounts for all of it in feature code and message
text: the application page (+11.5KB: edit, owner, transfer, create form),
the entry chunks (+9.4KB user: bilingual strings for every feature), the
login page (+4.0KB), the organizations page (+2.4KB). No dependency was
added and no chunk changed shape.

Nothing in it is waste to trim, so the baseline moves, with the numbers
written into the script as the previous re-baselines did. All four bases
go to the measured sizes so the next change starts from the current one
rather than from a headroom this work has already spent.
…or in claim-mappings

OrganizationsPage loads /api/me inside toggleConsents rather than on mount, so awaiting /api/me before clicking Org authorizations timed out. Also scope the created-row check in claim-mappings.spec.ts to <tr> so it does not collide with the success toast under Playwright strict mode.
Cross-app error catalog mirroring is enforced by scripts/check-ui-sync.mjs; remove the unreachable dynamic import and self-comparison fallback while keeping determinism, non-empty, and catalog completeness assertions.
…es/logs

Update the leftover !OAuth2Admin/src/pages/logs/ exception to !frontends/admin/src/pages/logs/ so new source files under that page directory are not silently ignored by **/logs/.
@voidvec
voidvec merged commit df6f2ce into master Nov 27, 2026
28 of 29 checks passed
@voidvec
voidvec deleted the feat/frontend-gap-phase12 branch November 27, 2026 11:41
voidvec added a commit that referenced this pull request Nov 29, 2026
…ign-in (#386)

The AF-01 frontend half (Phase 1+2, #379) requests the nine V045 resource
scopes at console sign-in, but the shipped fulla-admin-console client only
allowed openid/profile/admin: /oauth2/login dropped every resource scope at
the client-allowlist tier, leaving delegated accounts with no admin-class
scope and refusing the sign-in end to end.

- Widen allowed_scopes to the twelve login scopes in all five server
  configs and mirror the list in dev_admin_console_client.sql. Existing
  Postgres deployments backfill the new oauth2_client_scopes rows
  idempotently at server restart via ClientSeeder (verified locally: a
  3-row pre-change DB converged to 12 rows on boot; afterClientRow runs
  on ON CONFLICT DO NOTHING).
- config.dev.json: add the /api/admin/users.* permissions rbac_rules
  entry, aligning dev with config.json so delegated tokens pass
  AuthorizationFilter out of the box. ci/prod/bench stay operator opt-in
  (ci is memory-storage, where delegated accounts cannot exist).
- auth.ts: refresh the CONSOLE_LOGIN_SCOPE comment; the shipped allowlist
  now covers all twelve names, entitlements alone decide the issued set.
- AdminRbacEnforcementHttpTest: exercise the red line through the SHIPPED
  client - a users:read-only helpdesk account gets exactly
  openid/profile/users:read (read users OK, everything else 403); an
  unprivileged account obtains no admin-class scope; the admin role's own
  sign-in carries all twelve scopes and still passes the family gate.

Fixes #375
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