Skip to content

[M2.3f1a] Web workspace navigation: organizations, projects, environments - #168

Merged
samuelmbabhazi merged 2 commits into
mainfrom
feat/m2.3f1a-workspace-navigation
Nov 5, 2026
Merged

samuelmbabhazi merged 2 commits into
mainfrom
feat/m2.3f1a-workspace-navigation

Conversation

@samuelmbabhazi

Copy link
Copy Markdown
Collaborator

What changed

M2.3f1a: the first workspace screens in the web UI, built on the existing API.

  • WorkspaceApi: a same-origin session-cookie client (same browserRequest filter as identity) for organizations, projects and environments. Errors map to the existing bounded messages, never server details.
  • Pages (lazy routes, OnPush, reactive forms, ruled sections per DESIGN.md):
    • /orgs lists the account's organizations. Creating one requires the account password, and the rotated session is adopted, keeping only its public fields.
    • /orgs/:org shows the projects and a create form.
    • /orgs/:org/projects/:project shows the environments; new ones are protected by default (SPEC 7).
    • /orgs/:org/projects/:project/environments/:env shows the environment. Applications, deployments and secrets come next.
  • Navigation: the main menu gets "Organizations"; sign-in now lands on /orgs, as does /. Route parameters bind to component inputs (withComponentInputBinding).
  • Docs. The PLAN splits M2.3f1 into a (this PR) and b (settings, members, bindings, token scope picker).

How it was tested

  • New workspace-pages.spec.ts, with a fake fetch:
    • creating an organization sends the exact body, navigates, and keeps only the public session fields;
    • creating a project and an environment sends the exact bodies;
    • a 404 shows a bounded message without the server detail.
  • The identity specs were updated for the new landing page.
  • Web: 56 tests, lint, typecheck and build pass. The local gate passes.

Security considerations

  • No new credential path: same-origin cookies with CSRF.
  • The password field is cleared after each attempt, and nothing is stored in the browser.

Adds the workspace API client and pages to list and create
organizations (password re-authentication, rotated session adopted),
projects and environments (protected by default). Sign-in now lands on
the organizations, and the main navigation links to them.

Signed-off-by: Samuel Mbabhazi <[email protected]>
@samuelmbabhazi
samuelmbabhazi merged commit 0058814 into main Nov 5, 2026
1 of 10 checks passed
@samuelmbabhazi
samuelmbabhazi deleted the feat/m2.3f1a-workspace-navigation branch November 5, 2026 21:47
samuelmbabhazi added a commit that referenced this pull request Nov 7, 2026
…t found (#190)

## What changed

**`tenant.browser.spec.ts`**, real production assets, API, PostgreSQL
and Chromium (PLAN M2.3f2):

- Another organization's URLs answer 404 on every screen and show none
of its data.
- Role changes apply on the next request, for membership, a project
role, and their removal.
- An application is validated and created in the browser under the CSP.
- A second tab deploys and the first sees it through the live stream.
This is the first automated test of that stream over real HTTP.
- No WCAG A or AA violation on any workspace screen, and no uncaught
error or CSP violation on any of them.
- The audit export downloads under the CSP.
- Scoped tokens from the picker work as real bearers, and a revoked
project token gets 401.

**Product defects this found, fixed here:**

- During a rate-limit wait, submit buttons stayed enabled and clicking
them did nothing. They are now disabled on every form using
`MutationRunner`.
- Checkboxes were under the WCAG 2.5.8 minimum of 24px.
- Row buttons on members and roles all had the same accessible name.
They now name the person.

**The browser suite had gone stale with CI off**, and is repaired:

- Sign-in lands on organizations since #168; the helpers still expected
account security.
- Two tests still expected one-time secrets to hide on a timer, which
#98 deliberately removed.

**Harness:**

- The browser fixture now uses the restricted runtime role, as
production does; tenant commands refuse a role that can bypass row
security.
- `SHIPKEEP_DISPOSABLE_DATABASE_URL` opts in to a database that is safe
to wipe, where Docker is out of reach.

## How it was tested

Full browser suite: 16 of 16 pass, on Chromium with a local PostgreSQL
18.4 rather than the pinned 17. After that run, a small simplification
to the audit test's CSP check was verified by rerunning
`tenant.browser.spec.ts` (8 of 8).

## Not covered

- Lighthouse, so the M2.6 score is still open. axe is a related but
different check.
- Server removal in a browser: it needs an enrolled node.
- A deployment past `queued`: the fixture runs no worker, and there is
no real Docker or server.

## Security considerations

`SHIPKEEP_DISPOSABLE_DATABASE_URL` is read only by test code and only
for isolated databases, and that database is wiped. Production code is
unaffected apart from the UI fixes above.

## Checklist

- [x] Browser tests pass locally
- [x] No new shell invocation, no new secret exposure path
- [x] No new state change
- [x] PLAN updated

Signed-off-by: review <[email protected]>
Co-authored-by: review <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant