Skip to content

[M2.2e4c] Finish identity accessibility and document the UI - #75

Merged
samuelmbabhazi merged 2 commits into
mainfrom
feat/m2.2e4c-identity-finish
Nov 5, 2026
Merged

samuelmbabhazi merged 2 commits into
mainfrom
feat/m2.2e4c-identity-finish

Conversation

@samuelmbabhazi

@samuelmbabhazi samuelmbabhazi commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Task

M2.2e4c — identity UI finish review and design-system documentation. Stacked on #74; review this branch against feat/m2.2e4b2-security-browser. Earlier identity PRs remain unmerged.

What changed

The skip link previously resolved against the HTML base URL: activating it from password recovery navigated to login and discarded the typed email. It now focuses and scrolls the current main content without navigating. Two browser scenarios protect this behavior, keyboard validation/MFA controls, and token-table keyboard access after resizing.

Enabled inputs/selects use a separate 3.63:1 boundary against white. A visible, accessible scrolling cue appears whenever the token table exceeds its container, including the tablet layout; ResizeObserver tracks both table and container changes and disconnects on teardown. Structural dividers retain their lighter color.

The implemented interface is recorded in apps/web/DESIGN.md and its design preview sidecar. README and PLAN close the identity UI acceptance work on this stack; local review captures are ignored.

Why

Keyboard navigation must preserve work, form controls must be visible, and narrow screens must communicate hidden token actions. These changes resolve the two material findings from the independent finish review and the independently reproduced skip-link regression.

How it was tested

  • Both new Chromium scenarios failed before the fixes and pass afterward; the full suite passes all 8 scenarios against the production build, isolated PostgreSQL, HTTPS and local TLS SMTP.
  • 103 API and 51 web unit tests pass; workspace lint/typechecks and API/web builds pass. Go tests, buf lint and 84 PostgreSQL integration tests passed in this session with unchanged backend/Go/protobuf sources.
  • Seven final visual captures cover login/validation at 1440/390px and account security at 1440/768/390px. The independent reviewer's final disposition is ship, with both listed fixes resolved. This verdict is scoped to the fixes, not a whole-product accessibility certification.
  • GitHub CI passed on 9d4a296: TypeScript lint/tests/build, Go lint/tests, generated-code checks, Chromium acceptance, PostgreSQL/Docker integration, and all enabled security checks. CodeQL was skipped by the existing workflow. Design documentation YAML/JSON, token references and links validate; preview snippets were not independently browser-tested.

Security considerations

No API, authorization, cookie or persistence contract changes. Browser fixtures use synthetic accounts and hide private fill arguments in diagnostics. No credentials, screenshots, traces or HAR files are committed. Capture-only recovery codes were replaced by an obvious fixed placeholder before inspection. No new dependencies or shell invocation in application code. No new domain mutations require audit events.

Checklist

  • Acceptance criteria from docs/PLAN.md are met and the task is ticked
  • Lint, TS tests, Go tests and buf lint pass
  • Tests added for keyboard navigation, validation and narrow token-table access
  • No new shell invocation and no new secret exposure path
  • Audit events: no new domain state changes
  • Documentation updated; no API or architecture contract changed

@samuelmbabhazi
samuelmbabhazi force-pushed the feat/m2.2e4b2-security-browser branch from 956a49d to 6c8bdfc Compare November 5, 2026 12:42
@samuelmbabhazi
samuelmbabhazi changed the base branch from feat/m2.2e4b2-security-browser to main November 5, 2026 12:42
@samuelmbabhazi
samuelmbabhazi force-pushed the feat/m2.2e4c-identity-finish branch from 9d4a296 to 017b200 Compare November 5, 2026 12:43
@samuelmbabhazi
samuelmbabhazi merged commit 97b4edc into main Nov 5, 2026
10 checks passed
@samuelmbabhazi
samuelmbabhazi deleted the feat/m2.2e4c-identity-finish branch November 5, 2026 12:43
samuelmbabhazi added a commit that referenced this pull request Nov 5, 2026
## Task

M2.3a, stacked on #75 (`feat/m2.2e4c-identity-finish`). This is the pure
authorization foundation; persistence, HTTP enforcement and organization
screens remain tracked separately in PLAN.

## What changed and why

Add a default-deny tenant policy implementing SPEC 7 across the closed
permission vocabulary. It validates resource hierarchy and scope,
rejects unknown roles/capabilities, bounds resource grants to their
project/environment, and requires current protection metadata for
deploy, secret write and container exec. An explicit environment binding
overrides inherited project access; an environment-only grant allows
parent navigation but no sibling access or project administration.

Add a membership-change policy that prevents organization admins from
granting/changing ownership and preserves the last owner. The caller
must serialize changes under an organization lock; this pure function
does not provide database concurrency protection. Destructive actions
still require the separate M2.5 confirmation contract.

Split M2.3 into reviewable plan tasks and document conservative defaults
in SPEC/Open questions. No HTTP route uses the new policy yet; existing
tenant-token capabilities remain denied until the live adapter lands.

## Validation

- Test-first suite: 30 tests, including all 19 permissions across five
roles, protected environments, absent/foreign membership, malformed
contexts, unknown permissions/roles, duplicate bindings, scope
inheritance, and ownership changes. V8 reports 100%
statements/branches/functions/lines for the policy module.
- Workspace lint, typechecks and TypeScript tests pass; API/web builds
pass; Go tests and buf lint pass.
- No new dependencies, framework imports in domain code, generated-code
edits or application shell invocation.

## Security considerations

The integration adapter must load current membership, actual resource
ancestry and environment protection from the database. A policy allow is
neither proof of token scope nor a consumed destructive-action
confirmation. No persistence or mutation was introduced, so no new audit
event is required in this slice. API enforcement, tenant isolation and
concurrent last-owner checks remain explicit follow-up acceptance tasks.

## Checklist

- [x] M2.3a acceptance criteria recorded and task checked
- [x] Lint, TS tests, Go tests, buf lint and builds pass
- [x] Authorization denial and privilege-escalation cases tested
- [x] No new secret exposure or application shell execution
- [x] SPEC/PLAN updated; no persistence mutation to audit
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