Skip to content

fix(web): mount DM target main from layout and share Channel metadata - #862

Merged
GenerQAQ merged 3 commits into
mainfrom
fix/channel-main-handoff-samara
Oct 2, 2026
Merged

GenerQAQ merged 3 commits into
mainfrom
fix/channel-main-handoff-samara

Conversation

@GenerQAQ

@GenerQAQ GenerQAQ commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Why we need this PR?

A DM sidebar switch can reach the target layout while Next still supplies neutral/loading leaf children. Me layout now mounts the keyed target conversation directly, following server-channel ownership and retaining /c/me/[dmId] as the URL route.

What changed

  • DM, text, forum and thread use one Channel metadata Query/publication path. Current qualified canonical facts reuse that resource; disk-restored structure remains provisional. Nullable DM names normalize at the existing boundary without granting server access or discarding peer closure.
  • Me layout owns the explicit account/DM target main. Metadata, history and communication retain separate permissions: a current read-state receipt gates cached history/context/input, known blocks retain the blocked state, and sends use the existing API contract. Transient read errors retry locally.
  • Home/server use one scope-aware last-target resolver. Desktop can navigate directly to its remembered leaf; mobile retains list roots. Only a mounted, qualified target saves DM/channel last. Static Me modules cannot save an unresolved DM pathname.
  • Missing-DM exit consumes the cold fallback once per mounted account/target, preserving Machines through effect replay. The existing invalid cold-root DM destination/history assertions remain intact.
  • Fresh forum sidebar responses publish the returned qualified child identities into the shared Channel Query under the existing account/access/client/signal proof. Archived/pending rows and restored disk structure remain unqualified. Opening a warm sidebar child reuses that identity and opener without another metadata GET; child history still uses the existing read-state/message boundary.
  • Existing warm-reload fixtures verify three stages with WS closed: provisional target shell and withheld private content; current qualification with message/pin/thread responses still held and persisted message IDs/body visible; then released content responses with real inputs and the expected split panes. Desktop history asserts one direct remembered-leaf push.

No dependencies or backend contracts changed.

Validation

Current head: 0983e5d98eda01198cdcaa86e855074a556353b3. Normal commit hooks passed pnpm typecheck, pnpm lint, pnpm test, both typegrep checks and pnpm knip without bypass. Turbo tasks reused matched caches (Web: 901 files / 8859 tests); the hook's agent-driver and CI-script checks ran successfully. Independent regressions passed 3 files / 99 tests on the reviewed patch in a separate QA worktree. git diff --check passed; reviewed, staged and committed five-file patches match the implementation handoff byte for byte.

Exact-head independent Chromium checks on 0983e5d98: 31/31 PASS across four separate fresh invocations, each exit 0, one worker, zero retries, --max-failures=0, no skips: full warm/WS 7, full17/36/41 15, full DM 5 and the original navigation selection 4. All warm cache/qualification/content stages, retained-forum actual content/release/count/Back-Forward tail, exact remembered C, unchanged stale cold DM Machines, full DM permission/live/Retry and semantic navigation cases executed. These are selected browser checks, not native WebView acceptance.

Hosted CI run 37013548544 completed SUCCESS on this exact head: CI Gate, UI E2E Gate, all 12 UI shards, static checks, unit coverage, API E2E, UI build, packed artifact and Lighthouse passed. Scope-excluded Auth/Blog/Windows/Desktop Rust/resizable checks were skipped. Hosted codecov/patch check 110861816480 binds this head and reports 100.00% of diff hit, target 100.00%, SUCCESS.

The owner authorized merge and task cleanup once CI passed. Native macOS/iOS/Android runtime was NOT RUN before that instruction: only isolated unique-ID preparation, a macOS Rust development compile, local services and owned device boots occurred; no native App install/launch or computer-use control. After squash merge as 4efeedfc078b36132e872de9cd4b5af582539fbf, all three task worktrees and the local/remote task branch were removed; task services and owned device boots were stopped, with reports and original failures preserved. The shared working copy and formal App data were preserved. Native results and production root cause are not inferred from CI.

Earlier head 04687575 retains its own evidence: independent DM 5/5 PASS; warm/WS 1 pass / 1 failure / 5 not run, failing the invalid warm DM skeleton selector before qualification release. Hosted run 37009933813 completed FAIL: nine UI shards passed, shards 6/10/12 and UI E2E Gate failed, although patch coverage reached 100% and CI Gate passed. This batch fixes the selector, publishes fresh sidebar identity qualification, separates immediate warm identity from subsequently read child content, and binds history to C's actual qualified first destination. The current-head browser and hosted results above validate these corrections; earlier successes do not transfer automatically.

The owner's sustained production Tauri neutral wait, loaded WebView build identity and exact resource/RSC wait remain unverified; source tests and Chromium runs cannot close that report. Earlier bcd6cf84 failures also remain recorded separately.

Checklist

  • Tests added/updated as needed
  • All CI checks pass
  • PR targets the correct branch

Impact Areas

  • Shared library (@alook/shared)
  • Web app (@alook/web)
  • App (@alook/app)
  • Email Worker (@alook/email-worker)
  • WebSocket DO (@alook/ws-do)
  • CI/CD
  • Other

@codecov

codecov Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@GenerQAQ
GenerQAQ marked this pull request as ready for review October 2, 2026 13:50
@GenerQAQ
GenerQAQ merged commit 4efeedf into main Oct 2, 2026
28 checks passed
@GenerQAQ
GenerQAQ deleted the fix/channel-main-handoff-samara branch October 2, 2026 14:02
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.

1 participant