Skip to content

Conversation

@tyemirov
Copy link
Collaborator

Summary

  • gate the app UI behind an auth-only landing experience using mpr-ui components
  • wire landing/auth state transitions and keep existing controls available after sign-in
  • stabilize puppeteer coverage with per-iteration isolation and per-test browser contexts

Testing

  • make lint
  • make test
  • make ci

- add landing auth gate with invariants: signed-out sees landing, signed-in sees app

- adapt handlers/adapters to construct at edges: mpr-ui auth + per-test harness isolation

- remove interior defensive checks (shared harness globals) to prevent test flakes

- wrap errors with operation+subject+stable code (e.g., mpr_ui.load_failed)

- CI: go vet/staticcheck | ineffassign | npm test | make ci passing
@tyemirov tyemirov self-assigned this Jan 23, 2026
tyemirov and others added 28 commits January 23, 2026 10:37
… validation to edge

- add LandingAuthAttributes invariants: base/login/logout/nonce attributes set from runtime config

- adapt landing login wiring to construct attributes at bootstrap edge

- remove interior defensive checks (n/a)

- wrap errors with operation+subject+stable code (n/a)

- CI: make test, make lint, make ci passing
…onfig edge

- add static mpr-ui bundle tag and template mounts for auth elements

- adapt bootstrap to mount auth elements after runtime config + tauth load

- remove dynamic mpr-ui loader to avoid pre-init attributes

- wrap errors with operation+subject+stable code (unchanged)

- CI: make test | make lint | make ci passing
…dation to edge

- add MprUiCdnAssets with invariants: mpr-ui css/js use @latest CDN tag

- adapt handlers/adapters to construct at edges (update CDN mirror patterns)

- remove interior defensive checks (validated once at boundary) (not applicable)

- wrap errors with operation+subject+stable code (unchanged)

- CI: make test | make lint | make ci passing
…edge

- add runtime googleClientId override with invariant: non-empty string

- adapt runtime config JSON + harness payloads to supply client id

- keep validation at runtime-config boundary; no new interior checks

- emit stable error code for invalid client id (app_config.invalid_google_client_id)

- CI: make test/make lint/make ci, tsc --noEmit passing
- add frontend/config.yaml with per-origin auth settings

- load mpr-ui config before bundle and remove manual auth wiring

- enforce strict auth boot via config loader promise

- CI: make lint passing; make test/make ci killed by sandbox
- wait for DOMContentLoaded before config load

- init tauth + prime nonce prior to loading mpr-ui.js

- CI: make lint passing; make test killed by sandbox
- mirror mpr-ui demo proxy routes and origin lists

- expand CORS + tenant origin placeholders in config.tauth.yml

- CI: make lint passing; make test killed by sandbox
…tion

Added auth operation chaining to prevent race conditions when concurrent
auth events (authenticated/unauthenticated) interleave during async
operations like IndexedDB hydration.

Previously, rapid auth state changes could cause activeStorageKey to
change during hydrateActiveScope(), leading to a mismatch when
ensureHydrated() was called and throwing 'storage.notes.not_ready' error.

Changes:
- Added authOperationChain (Promise) to serialize auth operations
- Added authOperationId (number) to track and cancel stale operations
- Modified handleAuthAuthenticated to chain operations and check ID
- Modified handleAuthUnauthenticated with same pattern

Tests: node --test tests/auth.operationChain.test.js (9 tests)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Updates mpr-ui CDN references from @latest to @v3.6.2 which includes
the MU-132 fix for dispatching authenticated event after credential
exchange.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ation tests

- Remove authenticatedCount checks that required mpr-ui callback firing
- Use waitForSyncManagerUser to verify authentication completion
- Set initialProfile in TAuth harness to match expected test users
- Update UI tests to use prepareFrontendPage for proper auth flow
- Add skipAppReady option for landing page tests
- Set default 5-second timeouts for auth wait functions
- Refactor test harness to properly coordinate session cookies
- Add page-separation architecture (app.html + index.html)
- Delete legacy auth modules (auth.js, tauthSession.js, authControls.js)
- Add profileNormalization utility for TAuth/mpr-ui profile mapping

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- remove standalone fullscreen control and styling

- update menu toggle state handling with prefixed fullscreen events

- add Playwright coverage for menu-only toggle and webkit fallback

- CI: make test, make lint, make ci
tyemirov and others added 7 commits January 30, 2026 14:14
…i-config

GN-446: Adopt mpr-ui config.yaml loader
…ge-indexeddb

Fix GN-439 IndexedDB persistence
…me-google-client-id

feat(frontend): allow runtime google client id override; validate at edge
…mpr-ui-latest

feat(frontend): introduce MprUiCdnAssets smart constructor; move validation to edge
…mpr-ui-static-loader

feat(frontend): introduce mpr-ui static loader; move auth wiring to config edge
@tyemirov
Copy link
Collaborator Author

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d81cbf2b33

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

- add puppeteer login E2E + fullscreen menu regression; remove playwright test/dependency

- update CI to install Puppeteer only and extend per-file timeout for auth.login

- validation moved to edges: n/a (test-only change)

- errors wrapped with operation+subject+stable code: n/a

- CI: make ci passing
@tyemirov tyemirov merged commit ca91f05 into master Jan 31, 2026
1 check passed
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.

2 participants