Skip to content

fix(setup): first-run admin polish — nav pin, widget service-gate, i18n, settings PUT envelope - #2249

Merged
os-zhuang merged 1 commit into
mainfrom
fix/setup-firstrun-nav-i18n
Jun 23, 2026
Merged

os-zhuang merged 1 commit into
mainfrom
fix/setup-firstrun-nav-i18n

Conversation

@os-zhuang

Copy link
Copy Markdown
Contributor

What

First-run system-administration polish found by dogfooding the Setup app (系统设置) as a brand-new admin standing up the platform. Fixes the bounded items; the larger gaps stay tracked in #2246.

Area Fix
Discoverability Pin Localization + Company in the Setup sidebar Configuration group — both are registered service-settings manifests (the two lowest-order Workspace settings) but were reachable only via the "All Settings" hub.
Coherence Tag widget_organizations with requiresService: 'org-scoping' and extend the ADR-0057 D10 server-side visibility gate to dashboard widgets (rest-server) — single-tenant runtimes no longer render an orphan "Organizations" KPI (matching the already-hidden org nav entries).
i18n Translate nav labels Cloud Connection → 云连接, Datasources → 数据源, Capabilities → 能力; add missing zh help for the Localization settings fields.
API DX PUT /api/settings/:ns now also accepts the { values: { … } } envelope that GET returns (symmetry; was a confusing UNKNOWN_KEY).

Why

A real admin's first hour hit these: the two most important first-run settings (company identity, locale) weren't in the sidebar; the overview dangled an "Organizations: 0" KPI with no way to act on it; several nav/help strings leaked English in a zh session; and reading then writing a setting back failed.

The widget gate is the one non-trivial change: widget visibility was enforced client-side only (the console honors requiresObject but not requiresService), whereas ADR-0057 D10 makes the server the authoritative gate ("client filtering is courtesy"). This adds the missing server-side requiresService enforcement for widgets, mirroring the existing app-nav gate.

Verification

  • Builds green: platform-objects, service-settings, rest (incl. DTS typecheck).
  • Tests: service-settings 128 (+2), rest 133 (+6 dashboard-gate tests).
  • Browser-verified on examples/app-showcase (objectstack dev, zh session): Localization & Company pages reachable from the sidebar; Organizations KPI gone from the overview; 云连接 / 能力 shown; PUT {values:{…}} → 200.

Relates to #2246.

…8n, settings PUT envelope

Dogfooding the Setup app as a brand-new system administrator surfaced a
cluster of small first-run gaps. This fixes the bounded ones (larger
gaps tracked in #2246):

- Pin Localization + Company in the Setup sidebar (were reachable only
  via the All Settings hub despite being the two lowest-order Workspace
  settings).
- Extend the ADR-0057 D10 server-side visibility gate to dashboard
  widgets: rest-server strips widgets whose requiresService names an
  unregistered kernel service. Removes the orphan "Organizations" KPI in
  single-tenant runtimes, matching the already-hidden org nav entries.
- i18n: translate nav labels Cloud Connection (云连接), Datasources
  (数据源), Capabilities (能力); add missing zh help for the Localization
  settings fields.
- settings: PUT /api/settings/:ns now also accepts the { values: {...} }
  envelope that GET returns (symmetry).

Tests: service-settings 128 green (+2), rest 133 green (+6). All fixes
browser-verified on the showcase example.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
spec Building Building Preview, Comment Jun 23, 2026 5:45pm

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation tests tooling size/m labels Jun 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 3 package(s): @objectstack/platform-objects, @objectstack/rest, packages/services.

10 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:

  • content/docs/concepts/implementation-status.mdx (via @objectstack/rest)
  • content/docs/concepts/packages.mdx (via @objectstack/platform-objects, @objectstack/rest)
  • content/docs/concepts/setup-app.mdx (via @objectstack/platform-objects)
  • content/docs/guides/api-reference.mdx (via @objectstack/rest)
  • content/docs/guides/packages.mdx (via @objectstack/platform-objects, @objectstack/rest, packages/services)
  • content/docs/guides/plugins.mdx (via @objectstack/rest)
  • content/docs/guides/runtime-services/audit-service.mdx (via packages/services)
  • content/docs/guides/runtime-services/index.mdx (via packages/services)
  • content/docs/guides/runtime-services/settings-service.mdx (via packages/services)
  • content/docs/protocol/objectos/i18n-standard.mdx (via packages/services)

Advisory only. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs origin/main → pass the list as args.docs.

@os-zhuang
os-zhuang merged commit a619a3a into main Jun 23, 2026
14 of 15 checks passed
@os-zhuang
os-zhuang deleted the fix/setup-firstrun-nav-i18n branch June 23, 2026 17:46

This branch was successfully deployed

1 active deployment
Preview — 1a282103 Deployed Jun 23, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation size/m tests tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant