Skip to content

feat: session token visibility (admin user tab + account console) - #3421

Merged
tada5hi merged 5 commits into
masterfrom
feat/session-token-visibility
Aug 10, 2026
Merged

tada5hi merged 5 commits into
masterfrom
feat/session-token-visibility

Conversation

@tada5hi

@tada5hi tada5hi commented Aug 10, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Session-token visibility everywhere it was missing, plus two fixes found on the way.

  • Admin console /sessions: the per-row details action was a bare link with no button classes and rendered unstyled; it now uses the standard outline button pattern like every other index page.
  • Admin console user detail, Sessions tab: each session row links to the /sessions/:id detail page, which renders the session's token inventory.
  • server-core /session-tokens: reads now always join a client SUMMARY (id, name, displayName; the consent-list shape). client left the schema's relations allow-list, so ?include=client can no longer force the full-column join (redirect patterns, grant types, secret storage flags, accessPolicyId) for anyone, while a self-service reader without CLIENT_READ still sees application names on its own token rows.
  • Account console /account/sessions: each session card expands into its own token table (application, kind, created/expires, status; column-header grid on desktop, two-line stack on narrow screens). Deliberately no per-token ip/user-agent: server-side renderer refreshes stamp values like node, which would read as an unknown device to an end user.
  • client-web-theme: removed an unlayered legacy .flex { display: flex } from generics.css. It duplicated Tailwind's own utility, but as an unlayered rule it beat every layered utility changing display on a .flex element, so responsive patterns like sm:contents or sm:hidden silently never applied in any console.

Tests

  • New HTTP specs pin the client summary: it rides every read (non-privileged reader included) and include=client cannot widen it beyond the summary shape.
  • Full server-core suite green (186 files, 2064 tests). Consoles rebuilt and type-checked; all three surfaces verified in a running stack at desktop and mobile widths.

Summary by CodeRabbit

  • New Features

    • Added expandable session-token details in the account console, including application, type, creation, expiration, and status information.
    • Added session detail links to admin session and user session views.
    • Improved session-token results with concise client summaries.
  • Bug Fixes

    • Restricted session-token client data to safe summary fields.
    • Preserved responsive layout behavior for display utilities.

A self-service reader cannot include the client relation (the relations
read gate requires CLIENT_READ), so token rows carried only raw client
UUIDs for regular users. The repository now always joins a client
summary (id, name, displayName - the consent-list shape) and the client
relation leaves the schema allow-list, so include=client can no longer
force the full-column join for anyone.
Tailwind emits .flex in @layer utilities; the identical unlayered rule
from the pre-Tailwind generics sheet took cascade priority over every
layered utility changing display on a .flex element, so responsive
patterns like sm:contents or sm:hidden silently never applied.
Copilot AI lite review requested due to automatic review settings August 10, 2026 10:53

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 8d1dd6b8-358d-4291-99af-e7592189eab0

📥 Commits

Reviewing files that changed from the base of the PR and between f21d0e3 and 44dc20b.

📒 Files selected for processing (9)
  • .agents/architecture.md
  • apps/client-account-console/src/pages/sessions.vue
  • apps/client-admin-console/pages/sessions/[id]/index.vue
  • apps/client-admin-console/pages/sessions/index/index.vue
  • apps/client-admin-console/pages/users/[id]/sessions.vue
  • apps/server-core/src/app/modules/oauth2/repositories/session-token/repository.ts
  • apps/server-core/src/core/entities/session-token/schema.ts
  • apps/server-core/test/unit/http/controllers/entities/session-token.spec.ts
  • packages/client-web-theme/assets/css/styles/generics.css
💤 Files with no reviewable changes (1)
  • apps/client-admin-console/pages/sessions/[id]/index.vue

📝 Walkthrough

Walkthrough

Session-token APIs now return safe client summaries. Account-console sessions display expandable token inventories. Admin session pages add detail links. The theme removes an unlayered .flex rule.

Changes

Session token inventory

Layer / File(s) Summary
Safe client summary contract
apps/server-core/src/core/entities/session-token/schema.ts, apps/server-core/src/app/modules/oauth2/repositories/session-token/repository.ts, apps/server-core/test/unit/http/controllers/entities/session-token.spec.ts, .agents/architecture.md
The schema allows only session inclusion. Repository queries attach id, name, and displayName client summaries. Tests verify restricted fields and non-privileged access.
Account-console token details
apps/client-account-console/src/pages/sessions.vue
Session cards support expansion, token queries, lifecycle statuses, translations, pagination, and token fields.
Admin session navigation
apps/client-admin-console/pages/sessions/[id]/index.vue, apps/client-admin-console/pages/sessions/index/index.vue, apps/client-admin-console/pages/users/[id]/sessions.vue
Admin session views remove full client inclusion and add outlined detail buttons that link to session detail pages.

Theme display utility correction

Layer / File(s) Summary
Layered flex utility correction
packages/client-web-theme/assets/css/styles/generics.css
The unlayered .flex rule is removed. The stylesheet documents Tailwind’s layered utility behavior.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant SessionPage
  participant SessionTokenController
  participant sessionTokenRepository
  SessionPage->>SessionTokenController: Request tokens for a session
  SessionTokenController->>sessionTokenRepository: Find session tokens
  sessionTokenRepository-->>SessionTokenController: Return tokens with client summaries
  SessionTokenController-->>SessionPage: Return paginated token data
  SessionPage-->>SessionPage: Classify status and render details
Loading

Possibly related PRs

  • authup/authup#3186: Introduces the session-token inventory, schema, repository, and UI extended by this PR.
  • authup/authup#3420: Adds the admin session and token UI and data handling refined here.
  • authup/authup#3400: Adds session-token client attribution used by the client-summary behavior.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the primary change: session-token visibility in the admin user tab and account console.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/session-token-visibility

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install timed out. The project may have too many dependencies for the sandbox.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Aug 10, 2026

Copy link
Copy Markdown

Open in StackBlitz

authup

npm i https://pkg.pr.new/authup@3421

@authup/client-account-console

npm i https://pkg.pr.new/@authup/client-account-console@3421

@authup/client-admin-console

npm i https://pkg.pr.new/@authup/client-admin-console@3421

@authup/client-auth-console

npm i https://pkg.pr.new/@authup/client-auth-console@3421

@authup/server-core

npm i https://pkg.pr.new/@authup/server-core@3421

@authup/access

npm i https://pkg.pr.new/@authup/access@3421

@authup/client-web-kit

npm i https://pkg.pr.new/@authup/client-web-kit@3421

@authup/client-web-kit-theme

npm i https://pkg.pr.new/@authup/client-web-kit-theme@3421

@authup/client-web-nuxt

npm i https://pkg.pr.new/@authup/client-web-nuxt@3421

@authup/client-web-theme

npm i https://pkg.pr.new/@authup/client-web-theme@3421

@authup/core-http-kit

npm i https://pkg.pr.new/@authup/core-http-kit@3421

@authup/core-kit

npm i https://pkg.pr.new/@authup/core-kit@3421

@authup/core-realtime-kit

npm i https://pkg.pr.new/@authup/core-realtime-kit@3421

@authup/errors

npm i https://pkg.pr.new/@authup/errors@3421

@authup/i18n

npm i https://pkg.pr.new/@authup/i18n@3421

@authup/kit

npm i https://pkg.pr.new/@authup/kit@3421

@authup/server-adapter-kit

npm i https://pkg.pr.new/@authup/server-adapter-kit@3421

@authup/server-adapter-node

npm i https://pkg.pr.new/@authup/server-adapter-node@3421

@authup/server-adapter-socket-io

npm i https://pkg.pr.new/@authup/server-adapter-socket-io@3421

@authup/server-adapter-web

npm i https://pkg.pr.new/@authup/server-adapter-web@3421

@authup/server-kit

npm i https://pkg.pr.new/@authup/server-kit@3421

@authup/server-test-kit

npm i https://pkg.pr.new/@authup/server-test-kit@3421

@authup/specs

npm i https://pkg.pr.new/@authup/specs@3421

commit: 44dc20b

@tada5hi
tada5hi merged commit 776239d into master Aug 10, 2026
13 checks passed
@tada5hi
tada5hi deleted the feat/session-token-visibility branch August 10, 2026 11:04
@github-actions github-actions Bot mentioned this pull request Aug 10, 2026
@github-actions github-actions Bot mentioned this pull request Aug 13, 2026
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