Skip to content

Route the orphaned NamespacesAppPage as the real /app/namespaces console #16

Description

@harrymove-ctrl

Context

A fully-built namespace management console, NamespacesAppPage, exists at apps/web/src/main.tsx:5943 (token create/revoke, public/private visibility + directory flag, multi-source builder, schedules, alerts, webhooks) but is never routed. The /app/namespaces route (apps/web/src/main.tsx:1575) instead renders the lightweight read-only NamespacesSimplePage (main.tsx:5893). The orphaned page already calls live hosted endpoints (/api/hosted/namespaces, /api/hosted/directory, /api/hosted/schedules, /api/hosted/alerts, /api/hosted/namespaces/:ns/tokens), so all namespace/memory CRUD is built but unreachable from the UI.

Goal / user story

As an authenticated user, I can open /app/namespaces and manage my namespaces end-to-end — create/revoke read tokens, flip public/private + directory visibility, run the multi-source builder, and view/edit schedules, alerts, and webhooks — without dropping to the CLI or API.

Acceptance criteria

  • /app/namespaces renders <NamespacesAppPage authToken={sessionToken} /> instead of <NamespacesSimplePage /> (swap at main.tsx:1575).
  • Each /api/hosted/* endpoint the page consumes is confirmed live in apps/api/src/worker.ts (audited and listed in the PR description).
  • Token create + revoke works against /api/hosted/namespaces/:ns/tokens and a freshly created token is shown once.
  • Visibility (private/public) + directoryEnabled toggle persists via the metadata save and survives a refresh.
  • Schedules, alerts, and webhooks lists render and are creatable; a failed refresh() shows a visible error (not an unhandled throw).
  • The decision to keep or retire NamespacesSimplePage (e.g. reuse it for the public showcase browse) is documented; no other call site regresses.

Implementation notes

  • Single-line route swap at apps/web/src/main.tsx:1575; the component signature is NamespacesAppPage({ authToken }) and it already uses authHeaders(authToken).
  • refresh() (main.tsx:5969) throws on non-ok responses — make sure the useEffect catch surfaces error state in the UI (this pairs with the skeleton/error-card issue).
  • The visibility toggle (metadataDraft.visibility, ~main.tsx:5950) is the exact surface where a future "Encrypted (SEAL)" badge and Harbor bucket/seal_policy_id indicators will live — exposing it now is the prerequisite for that on-chain UI.
  • Gotcha: no skeleton/loading exists in this page yet; either land minimal inline loaders here or sequence after the skeleton-system issue.

Sui Overflow angle

This console is where private-vs-public namespace control becomes visible. Once routed, it is the natural home to surface Harbor Bucket + seal_policy_id objects and Sui explorer deep-links — i.e. the place the on-chain provenance/encryption story gets demoed. It is the single biggest UX unlock and a prerequisite for every later Sui-native namespace UI.

Dependencies

None to ship the route swap. Enhanced by the skeleton/empty/error-states issue and the Sui wallet sign-in issue (for sessionToken/identity).

Part of the ContextMEM roadmap (#4) • Sui Overflow build.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0Demo-blocking: required for a working Sui Overflow demofeatureUser- or agent-facing capabilityui-uxWeb app UI/UX, accessibility, and responsive design

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions