Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
5b9f22e
refactor(host): adopt Rust TrUAPI runtime
pgherveou Jul 15, 2026
9b29b7b
test(ui): wait for bridge lifecycle events
pgherveou Jul 15, 2026
2864c01
test(ui): allow cold topbar import
pgherveou Jul 15, 2026
95b810c
fix(ui): preserve notification requests
pgherveou Jul 15, 2026
e8915f0
docs(shared): remove stale auth reference
pgherveou Jul 15, 2026
44b880c
refactor(protocol): unify auth storage keys
pgherveou Jul 15, 2026
6e8dc55
refactor(protocol): defer chainSend flush error responses to a follow-up
pgherveou Jul 15, 2026
d2c57a1
refactor(resolver): defer dependency pruning and coverage tests to a …
pgherveou Jul 15, 2026
984f073
refactor(debug): defer panel fixes unrelated to the port to a follow-up
pgherveou Jul 15, 2026
98690c0
refactor(ui): defer permission-prompt rate limiting to a follow-up
pgherveou Jul 15, 2026
6c01473
refactor(ui): defer allowance-key at-rest encryption to a follow-up
pgherveou Jul 15, 2026
c6a1d94
refactor(bridge): defer the per-frame wire debug tap to a follow-up
pgherveou Jul 15, 2026
cf99551
refactor(topbar): defer login-failure copy and popover hardening to a…
pgherveou Jul 15, 2026
963ac83
build(ui): depend on published @parity/truapi 0.4.0 and @parity/truap…
pgherveou Jul 15, 2026
0bf87e5
build: link local TrUAPI packages
pgherveou Jul 15, 2026
95e8bac
refactor(config): keep base formatting for unchanged gateway helpers
pgherveou Jul 15, 2026
d1640a1
fix(ui): translate legacy Nova follow ids
pgherveou Jul 16, 2026
9ec38d0
fix(ui): isolate opened navigation tabs
pgherveou Jul 17, 2026
6dea057
fix(ui): avoid duplicate permission rows
pgherveou Jul 17, 2026
c35f944
fix(ui): reject login when core closes
pgherveou Jul 17, 2026
26a93be
test(ui): cover confirmation variants
pgherveou Jul 17, 2026
8f0c9cd
fix(ui): pin legacy bridge origin
pgherveou Jul 17, 2026
4493ea3
fix(ui): verify cached preimages
pgherveou Jul 17, 2026
29d89b3
fix(ui): handle ring proof reviews
pgherveou Jul 17, 2026
b93d9a0
chore: merge main into Rust core port
pgherveou Jul 17, 2026
f7d372f
fix(ui): support published confirmation types
pgherveou Jul 17, 2026
ed783fc
fix(ui): retain legacy alias shape
pgherveou Jul 17, 2026
37a6f54
build(ui): update TruAPI to 0.4.1
pgherveou Jul 17, 2026
9648cf6
test(e2e): support local host playground
pgherveou Jul 20, 2026
7c27048
update with temporary packages
pgherveou Jul 20, 2026
be0092a
merge
pgherveou Jul 20, 2026
b570793
fix bridge
pgherveou Jul 20, 2026
b407af4
update package deps
pgherveou Jul 20, 2026
0fb0672
fix modal
pgherveou Jul 20, 2026
9667cbf
fix(metrics): keep event callbacks intact
pgherveou Jul 20, 2026
2840b45
fix(ui): normalize local legacy accounts
pgherveou Jul 20, 2026
7921ce4
fix(ui): address core migration regressions
pgherveou Jul 20, 2026
902e79c
refactor(ui): remove the legacy Nova host-api bridge
pgherveou Jul 20, 2026
3fde066
Merge remote-tracking branch 'origin/main' into remove-legacy-mode
Jul 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ The active launch path is `packages/ui/src/bridge.ts`:
- calls `createIframeHost(...)` with the product URL, sandbox policy, allowed
origin, and the worker-backed provider.

Modern product frames enter the Rust core through the iframe `MessageChannel`.
The temporary Nova compatibility shim forwards legacy `window.postMessage`
frames into the same product-scoped provider.
Product frames enter the Rust core through the iframe `MessageChannel`.
Account, signing, statement-store, SSO pairing, restore, and logout are
core-owned and do not cross the JS host callback boundary as Nova-specific
routes.
Expand Down
7 changes: 3 additions & 4 deletions packages/protocol/src/auth-storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,9 @@ export function buildSharedAuthStorageKey(siteId: SiteId, key: string): string {
/** Storage key used by the removed Nova host runtime. Its session encoding is
* incompatible with TrUAPI, so the protocol host deletes this key at boot.
*
* TODO(remove-legacy-nova): unlike the product-facing shim sites sharing this
* tag, this cleanup is gated on returning browsers, not on product migration:
* delete it (with `LEGACY_SHARED_AUTH_SESSION_KEY` above and
* `clearLegacySharedAuthSession` in `apps/protocol/src/main.ts`) once stale
* TODO(remove-legacy-nova): this cleanup is gated on returning browsers, not
* product migration. Delete it (with `LEGACY_SHARED_AUTH_SESSION_KEY` above
* and `clearLegacySharedAuthSession` in `apps/protocol/src/main.ts`) once stale
* `PAPP_*` keys in long-lived browser profiles are no longer a concern. */
export function buildLegacySharedAuthSessionStorageKey(siteId: SiteId): string {
return `PAPP_${siteId}_${LEGACY_SHARED_AUTH_SESSION_KEY}`;
Expand Down
67 changes: 0 additions & 67 deletions packages/ui/src/bridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@ import { onStoredSessionChanged } from "./host-callbacks/SessionStore";
import { LoginRequestError } from "./login-request-error";
import { createTruapiRuntimeConfig, labelToProductId } from "./runtime-config";
import { describeWireFrame } from "./debug-wire-describe";
// TODO(remove-legacy-nova): import used only by the legacy probe tagged below.
import {
createLegacyNovaChainHeadProvider,
createWindowMessageProvider,
} from "./legacy-host-bridge";
import type { BlockingModalCoordinator } from "./blocking-modal-queue";
import { showNotification } from "./notification";

Expand Down Expand Up @@ -702,10 +697,6 @@ async function createHost(args: {
const productId = args.productId ?? labelToProductId(args.label);
let productProvider: Provider | null = null;
let disposePipe: (() => void) | null = null;
// TODO(remove-legacy-nova): `legacyProbeCleanup` (including its two `?.()`
// call sites in `dispose()` and the catch block below) exists only for the
// legacy probe block tagged further down.
let legacyProbeCleanup: (() => void) | null = null;
const pipeArgs = {
flowId: args.debugFlowId,
label: args.label,
Expand All @@ -731,62 +722,6 @@ async function createHost(args: {
},
});

// DEPRECATED legacy host-API support. Modern products announce themselves
// with `{type:"truapi-ready"}` and use the MessagePort wired above. Products
// still on the Nova host-api SDK instead post raw SCALE frames (Uint8Array)
// to `window.parent`. Detect that first frame and re-pipe the core over a
// window-postMessage provider.
//
// TODO(remove-legacy-nova): once the last legacy Nova product migrates to
// `@parity/truapi`, delete this probe block (through the
// `legacyProbeCleanup` assignment below), the `legacyProbeCleanup`
// declaration and call sites tagged above, the `legacy-host-bridge`
// import at the top of this file, and the tagged `legacy-host-bridge.ts`
// module itself. Modern products need no probe: the MessagePort from
// `onPort` is the only wiring.
let probeMode: "pending" | "modern" | "legacy" = "pending";
const onProbe = (event: MessageEvent): void => {
if (probeMode !== "pending") {
return;
}
const targetWindow = host.iframe.contentWindow;
if (
!targetWindow ||
event.source !== targetWindow ||
event.origin !== args.allowedOrigin
) {
return;
}
if (event.data instanceof Uint8Array) {
probeMode = "legacy";
legacyProbeCleanup?.();
// Drop the unused modern MessagePort pipe before rewiring.
cleanupProductSide();
const windowProvider = createWindowMessageProvider(
targetWindow,
args.allowedOrigin,
);
const legacyProvider = createLegacyNovaChainHeadProvider(
windowProvider,
productId,
);
productProvider = legacyProvider;
disposePipe = pipeProviders(legacyProvider, coreProvider, pipeArgs);
// Replay the handshake frame the probe just consumed.
windowProvider.injectInbound(event.data);
} else if (
(event.data as { type?: unknown } | null)?.type === "truapi-ready"
) {
probeMode = "modern";
legacyProbeCleanup?.();
}
};
window.addEventListener("message", onProbe);
legacyProbeCleanup = () => {
window.removeEventListener("message", onProbe);
legacyProbeCleanup = null;
};

return {
iframe: host.iframe,
requestLogin(reason) {
Expand All @@ -800,15 +735,13 @@ async function createHost(args: {
},
dispose() {
unregisterPermissions();
legacyProbeCleanup?.();
cleanupProductSide();
coreProvider.dispose();
host.dispose();
},
};
} catch (error) {
unregisterPermissions();
legacyProbeCleanup?.();
cleanupProductSide();
coreProvider.dispose();
throw error;
Expand Down
Loading
Loading