Skip to content

fix: P1 console UX — settings, empty states, loading, public confirm - #4

Merged
chenow9 merged 1 commit into
mainfrom
fix/p1-console-ux
Sep 21, 2026
Merged

chenow9 merged 1 commit into
mainfrom
fix/p1-console-ux

Conversation

@chenow9

@chenow9 chenow9 commented Sep 20, 2026

Copy link
Copy Markdown
Owner

Depends on #3 (P0 console UX). Branch is fix/p1-console-ux from fix/p0-console-ux. Merge after #3, or retarget to main once #3 lands.

Summary

Implements only the four P1 console UX fixes. No protocol or security-model changes.

P1-1 — Settings, not System; 2FA copy matches reality

  • Nav/title are 设置 / Settings. URL is /settings; /deploy redirects.
  • No bind/toggle 2FA UI (that is gateway-configured). Password-only gateways see a password block; 2FA manage stays only when 2FA is actually required and bound.
  • Password change keeps working and shows the 8-character rule in-product.

P1-2 — Unified empty-state pattern

  • Shared empty state: icon + one reason sentence + optional action.
  • Applied to nodes, services, traffic, and audit.
  • Charts with no signal show centered 暂无流量 / No traffic yet and hide axes/legend.

P1-3 — Loading ≠ empty

  • Audit first load shows 正在读取审计记录…, not “没有匹配的记录”.
  • Empty database vs filtered no-match use different copy.
  • Traffic and audit filter-empty states have 清除筛选, like nodes/services.

P1-4 — Confirm before Public access

  • Selecting or saving Public access opens a confirm dialog stating the port will be publicly reachable / scannable.
  • Cancel keeps the previous mode. Public cannot persist from a single accidental click.

Files changed (why)

Area Files Why
Settings route/nav routes/settings.tsx, routes/deploy.tsx, app-shell.tsx, quick-launcher.tsx, routeTree.gen.ts, umbra-ui-smoke.mjs P1-1
Settings copy / password system-page.tsx, auth-panel.tsx, messages.ts P1-1
Empty state empty-state.tsx, nodes/mappings/traffic/audit pages, rate-chart.tsx P1-2, P1-3
Public confirm service-editor.tsx, service.ts P1-4
Tests service.test.ts, i18n.test.ts P1-1, P1-4

How verified

  • Unit: needsPublicConfirm; i18n nav.settings; existing service tests still pass.
  • npx tsc --noEmit and eslint on touched files.
  • Playwright against a local auth-off console (stacked on fix: P0 console UX — access modes, enroll confirm, name/host/CIDR validation #3 UI):
    • P1-1: heading/nav 设置; intro says deploy is not on this page; /deploy → /settings; no bind-2FA CTA.
    • P1-2: nodes/services empty sentence + CTA; traffic chart 暂无流量.
    • P1-3: audit does not treat load as “no matching records”; audit/traffic filter empty + 清除筛选.
    • P1-4: selecting 公开访问 opens confirm with scannable copy; cancel leaves 凭证访问 checked.
  • Password-rule hint is in the change-password form; not exercised in the auth-off Playwright run (AuthPanel is hidden when login is off).

Checklist

  • P1-1 Rename System page + make 2FA copy match reality
  • P1-2 Unify empty-state pattern
  • P1-3 Observability: loading ≠ empty
  • P1-4 Secondary confirm before Public access

Rename System to Settings with a /settings route, make 2FA copy match
what the page can do, unify empty states, keep loading distinct from
empty, and require a second confirm before public access.
@chenow9
chenow9 changed the base branch from fix/p0-console-ux to main September 21, 2026 01:25
@chenow9
chenow9 merged commit 52a9178 into main Sep 21, 2026
1 of 2 checks passed
@chenow9
chenow9 deleted the fix/p1-console-ux branch September 29, 2026 07:42
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