Skip to content

feat(mobile): fire the page's haptics over the bridge notify (OTA phase C, C7.10 E) - #21864

Merged
Jinwoo-H merged 9 commits into
mainfrom
ota-c7-10e-haptics
Sep 21, 2026
Merged

Jinwoo-H merged 9 commits into
mainfrom
ota-c7-10e-haptics

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 14 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​843 $\color{#cf222e}{\Huge{\mathbf{−}}}$​9 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​834
Prod 18 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​446 $\color{#cf222e}{\Huge{\mathbf{−}}}$​25 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​421

Summary

Phase C, C7.10 PR E (ruling 26: the OTA page loses no capability; ruling 30: haptics ride the notify channel): the page's haptics fire the phone's motor. haptics.web.ts was five no-ops (the expo web shim's fake click had broken long press, C1.9); it now posts native.haptics.trigger with kind one of the five the native haptics.ts has, over the bridge's existing fire-and-forget notify channel, under a new grant token haptics in BRIDGE_NOTIFY_GRANTS. The shell's handler is a mapping onto the native file's own functions, so the Platform.OS split and the Android constants exist once. No new frame kind, no reply, no verb table row, no BRIDGE_PROTOCOL_VERSION change, no Swift or Kotlin change. Inert on released apps (no release carries the shell). Not inert for the page: the grant is carried by the five page routes whose closure reaches the seam (derived by census, not listed by hand), and page-route-policy.ts serves a page route only when the shell implements every grant it declares, so a shell without the haptics token renders every one of those routes natively; the flip build carries the token (C8 checklist).

Why a notify and not a verb (ruling 30): a verb's reply counts against the bridge's 64-request in-flight window, and triggerSelection fires per file-explorer row; a notify is 70–77 bytes per kind (0.011% of the frame cap) and a twelve-row scroll is 888 bytes across 12 frames.

Shape. The envelope arm's fields live in bridge/bridge-haptics-notify.ts (the envelope file is at its line cap; the version literal stays in the envelope and the fields are spread beside it, no cycle). The shell's half is a required onHaptic on BridgeHostOptions, as onExternalLink is, because a static import of the app's haptics inside bridge-host.ts would put react-native in every test that loads it. page-haptics.ts is the one mapping.

measure value
call sites now posting (error / success / selection / mediumImpact / edgeBump) 43 / 24 / 12 / 10 / 1 = 90
importing product modules 35
frame bytes per kind (mediumImpact / selection / success / error / edgeBump) 77 / 74 / 72 / 70 / 73
routes granted (of page routes reaching the seam) 5 of 5
page closure delta per route +1 module

Tests. Envelope case per kind; an ungranted haptics refused; the grant table's totality over the union (a missing row is a type error); shell dispatch (neutering onHaptic reds 2 of 29 cases); a page test that each of the five web functions posts exactly one notify with its kind; the config/scripts census that every module in a page route's closure importing the seam resolves to the .web.ts and that the web sibling posts for all five names, with the control that the same walk over the native file returns five non-posting sites (dropping one route's grant or neutering one web post each red one census case); the shell's two grant pins carry the token.

Commits:

commit what
048a21ee6f feat(mobile): give the page a haptics notify and the grant that gates it
cce0f58861 feat(mobile): post the page's haptics over the notify instead of doing nothing
cdc8f0598c feat(mobile): grant haptics on every page route, with a census that derives the list
8b40406fda test(mobile): record what the haptics notify costs a page closure
e9c48e0760 merge of origin/main (2524737ef0; no footer)
8d0a5921b6 test(mobile): carry the haptics grant into the shell's two grant pins
091f02b725 refactor(mobile): map each haptic kind to a named import, not a namespace index
772c2dbb23 docs(mobile): state the true reason the haptics grant is one token (round-1 folds: the false GRANT_NAME_PATTERN reason removed from four places; the route-availability coupling pinned in page-route-policy.test.ts with the token-free route as control; test titles by kind; a comment wrapped)

Verification

Round 1 (fresh): approve; findings were comment and test-title fixes, folded as 772c2dbb23. Lead re-gate at that head: tsc 0, ratchet 0, oxlint 0, oxfmt 0, changed-code quality 0, anti-slop 0, bridge + platform + web-shell suites 65 files / 981 passed, seam census 28/28, machine paths 0 (the fold touches 8 files, +75/−20, no wire, grant, kind or byte change).

Lead gate on 091f02b725 against 2524737ef0 (verify-gates.sh, artifacts rebuilt): tsc 0, tests-typecheck ratchet 0, oxlint 0, oxfmt 0, changed-code quality 0, react-doctor 0, oxlint-config 0, anti-slop 0, merge-max-lines 0, root oxlint over 31 changed files 0, root oxfmt over 6 files 0, machine paths 0; config/scripts 236 passed + the known owner-loss timing flake (green alone, 21/21); mobile 772 files / 8,649 passed, 0 failed. Lead control: triggerEdgeBump neutered in the web sibling → the seam census fails exactly posts every kind the notify admits from the web sibling, and nothing more (1 of 28).

Known flakes seen once by the lane and green on re-run: bridge-terminal-output-backlog, rpc-params-contract-type-only-boundary (5 s timeouts under full-suite load), pr-workflow-parallelism (glob read race).

Headroom note: bridge-envelope.ts has 2 lines of max-lines headroom and config/scripts/build-mobile-web-app-bundle.test.mjs 10; a merge touching either can red on the cap (split at a module boundary, never a bump).

Not in this PR: dictation (PR D), the rich editor (C1/C2), the HTML preview (#21862), Mermaid (PR B).

`native.haptics.trigger` joins the envelope's notify union with a `kind` of exactly
the five `src/platform/haptics.ts` has, and the single token `haptics` joins
`BRIDGE_NOTIFY_GRANTS` and `MOBILE_WEB_SHELL_GRANTS`. A notify rather than a verb
because nothing is owed back: a reply would spend a slot in the same 64-deep
in-flight window a forwarded request does, and there are 90 call sites in this app,
some of them one per row of a scrolling list (rulings-ota-c7.md ruling 30).

The arm's fields live in their own module because `bridge-envelope.ts` is at its
line cap, as `bridge-event-envelope-bytes.ts` already is; the version literal stays
in the envelope, so the fields are spread in beside it rather than reading it back
through an import cycle.

The shell's half rides `onHaptic` on `BridgeHostOptions`, as every other
device-local notify does: the host is the protocol's side of the bridge and a static
import of the app's haptics would put `react-native` and `expo-haptics` in its
graph, which breaks every test that loads it. `page-haptics.ts` is the one mapping —
`haptics.ts`'s own functions, its `Platform.OS` split and its Android
`HapticFeedbackConstants` untouched.

The dispatch branch rides along with the union rather than waiting for the page
side: `Record<BridgeNotifyName, …>` and the `notify` fall-through are total over
that union, so the shell does not compile without it. That is the totality working,
and `bridge-notify-grants.test.ts` shows it as the TS2741 a missing row is.

Red first: the envelope cases per kind, the ungranted refusal, the grant-list pin
and the missing-row type error all failed against the tree before this. Control on
the dispatch: neutering `options.onHaptic` reds 2 of the 29 cases.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
…g nothing

`haptics.web.ts` stops being five no-ops. Each of the five posts its own kind
through the notify seam the entry publishes — the same shape
`publishExternalLinkOpener` has, and for the same reason: every caller is a plain
function inside a row's press handler that no provider wraps. `notifyHaptics` joins
the page client beside the other gated notifies and answers whether the frame left,
which nothing reads: a tap that did not buzz is what the page did before this, and a
warning per refusal would be one per row of a scrolling list.

Measured off the frame the client posted rather than a written copy of its shape,
which is what drifts: 77 / 74 / 72 / 70 / 73 bytes for mediumImpact / selection /
success / error / edgeBump, the widest under 0.012% of `BRIDGE_MAX_MESSAGE_BYTES`,
and a twelve-row scroll 888 bytes across twelve frames.

The `web-overrides.json` reason now says what the file does instead of what it
declines to do.

Red first: the nine web-seam cases failed on `publishHapticsNotifier is not a
function`, and the six client cases on `notifyHaptics is not a function`.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
…erives the list

All five declared page routes carry the `haptics` grant, and the list is a
measurement rather than a hand choice: `WorktreeListRow` is in every page closure and
calls the seam, so a route without the grant is a page whose taps stop buzzing with
nothing on screen to say why. Grants are resolved once from the route the shell
opened and held for the session, so the declaration is the only place to fix it.

`mobile-web-app-haptics-seam.mjs` is the shared walk, beside the external-link one:
it reads the kinds off the tuple that declares them, finds every exported `trigger…`
function in a haptics module, and reports the kind each one posts. The posting call is
found through the binding `publishHapticsNotifier` assigns rather than a local spelled
`post`, because a rename would otherwise turn every posting site into a non-posting
one and leave this green on a page with no haptics at all.

The census proper holds each route's closure to the `.web.ts` sibling, asserts at
least one importer so the grant is not idle, and derives the granted-route list from
the closures. The control is the design's: the same walk over the native sibling
finds the same five functions and no posting site, so "all five post" is a number
rather than an empty scan.

Controls run: dropping `haptics` from one route reds 1 of 23; neutering one web post
reds 1 of 23.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
One module. Every page closure grew by exactly `bridge-haptics-notify.ts`, and it
arrives through `page-route-policy.ts` reading the grant token rather than through the
seam, whose import of the kind type is erased; its only dependency is `zod`, which the
envelope already put in every closure, so the module total moved by the same one.
Local counts per route went 294 → 295, 379 → 380, 435 → 436, 309 → 310, 335 → 336.

Pinned structurally rather than as a total, because an absolute closure count is
main's to move and a number that drifts for unrelated reasons is one nobody reads.

The call sites this replaces, measured over product modules: `triggerError` 43,
`triggerSuccess` 24, `triggerSelection` 12, `triggerMediumImpact` 10,
`triggerEdgeBump` 1 — 90 across 35 importing modules, which is the design's count plus
`page-haptics.ts` itself.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
`bridge-host-init.test.ts` names the grants `init` issues, so the token belongs in
that list. `MobileWebShellScreen.test.tsx` now mocks `expo-haptics` for the reason it
already mocks the clipboard and both pickers: the screen hands `playPageHaptic` over
and reaching the real module pulls in an Expo runtime this test does not have, which
failed the whole suite at import. Which expo member each kind reaches stays in
`page-haptics.test.ts`.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
…pace index

The changed-code gate refuses a computed reference into an imported namespace, in
both the mapping and its test, and it is right to: `haptics[NAME_BY_KIND[kind]]()`
is a call nothing can follow. Each function is a named import instead, which also
keeps the second compile-time direction — a row naming something `haptics.ts` does
not export is now an import error rather than a `keyof` mismatch.

The third direction moves with it, from a namespace read in the test to the census
that already reads both files' text: `hapticsImportedNames` names what the shell's
mapping takes from the app's haptics, and the census holds that to the five the
native file exports. So a haptic added there with no kind of its own still fails,
and now it fails where the other two siblings' names are already compared.

The test's two `as` assertions become one annotated hoisted type, the shape
`MobileWebShellScreen.test.tsx` uses.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
@coderabbitai

coderabbitai Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Warning

Review limit reached

Next included review available in 1 minute.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: fa846348-54c3-4c0c-84bc-6ec0999cdc9a

📥 Commits

Reviewing files that changed from the base of the PR and between 772c2db and bc50e1b.

📒 Files selected for processing (32)
  • config/scripts/build-mobile-web-app-bundle.test.mjs
  • config/scripts/mobile-web-app-files-render.test.mjs
  • config/scripts/mobile-web-app-haptics-seam.mjs
  • config/scripts/mobile-web-app-haptics-seam.test.mjs
  • config/scripts/mobile-web-app-tasks-render.test.mjs
  • config/scripts/mobile-web-page-routes.mjs
  • mobile/src/mobile-web-shell/MobileWebShellScreen.test.tsx
  • mobile/src/mobile-web-shell/MobileWebShellScreen.tsx
  • mobile/src/mobile-web-shell/bridge-host-contract.ts
  • mobile/src/mobile-web-shell/bridge-host-init.test.ts
  • mobile/src/mobile-web-shell/bridge-host-notifications.test.ts
  • mobile/src/mobile-web-shell/bridge-host-test-harness.ts
  • mobile/src/mobile-web-shell/bridge-host.ts
  • mobile/src/mobile-web-shell/bridge/bridge-client-notifications.test.ts
  • mobile/src/mobile-web-shell/bridge/bridge-client-notifications.ts
  • mobile/src/mobile-web-shell/bridge/bridge-envelope.test.ts
  • mobile/src/mobile-web-shell/bridge/bridge-envelope.ts
  • mobile/src/mobile-web-shell/bridge/bridge-haptics-notify.ts
  • mobile/src/mobile-web-shell/bridge/bridge-notify-grants.test.ts
  • mobile/src/mobile-web-shell/bridge/bridge-notify-grants.ts
  • mobile/src/mobile-web-shell/bridge/bridge-port-pair-test-harness.ts
  • mobile/src/mobile-web-shell/bridge/bridge-rpc-client.ts
  • mobile/src/mobile-web-shell/page-haptics.test.ts
  • mobile/src/mobile-web-shell/page-haptics.ts
  • mobile/src/mobile-web-shell/page-route-policy.test.ts
  • mobile/src/mobile-web-shell/page-route-policy.ts
  • mobile/src/mobile-web-shell/use-mobile-web-shell-bridge.test.ts
  • mobile/src/mobile-web-shell/use-mobile-web-shell-bridge.ts
  • mobile/src/platform/haptics.web.test.ts
  • mobile/src/platform/haptics.web.ts
  • mobile/web-entry/index.tsx
  • mobile/web-entry/web-overrides.json

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 57e6ee72-0bf3-4e88-bca5-8f96c3194580

📥 Commits

Reviewing files that changed from the base of the PR and between 091f02b and 772c2db.

📒 Files selected for processing (8)
  • config/scripts/mobile-web-app-haptics-seam.test.mjs
  • mobile/src/mobile-web-shell/bridge/bridge-client-notifications.ts
  • mobile/src/mobile-web-shell/bridge/bridge-haptics-notify.ts
  • mobile/src/mobile-web-shell/bridge/bridge-notify-grants.test.ts
  • mobile/src/mobile-web-shell/bridge/bridge-notify-grants.ts
  • mobile/src/mobile-web-shell/page-route-policy.test.ts
  • mobile/src/mobile-web-shell/page-route-policy.ts
  • mobile/src/platform/haptics.web.test.ts
🚧 Files skipped from review as they are similar to previous changes (7)
  • mobile/src/mobile-web-shell/page-route-policy.ts
  • mobile/src/mobile-web-shell/bridge/bridge-notify-grants.ts
  • mobile/src/mobile-web-shell/bridge/bridge-notify-grants.test.ts
  • config/scripts/mobile-web-app-haptics-seam.test.mjs
  • mobile/src/mobile-web-shell/bridge/bridge-haptics-notify.ts
  • mobile/src/platform/haptics.web.test.ts
  • mobile/src/mobile-web-shell/bridge/bridge-client-notifications.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 4 remain after this review.


📝 Walkthrough

Walkthrough

The change adds grant-controlled haptics notifications to the mobile web-shell bridge. Web haptics functions send five supported kinds through the bridge. The native shell validates and dispatches each kind to platform-specific haptic functions. All mobile web routes declare the haptics grant. Tests cover protocol validation, grant enforcement, client-host transport, device mappings, route closures, and web/native seam consistency.

Priority: ⬇️ Low

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 61.54% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 26 functions across 31 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The description gives detailed implementation and verification information, but it omits required template sections, including the Linked Issue, Visual Proof or an explicit N/A explanation, checklist … Add all required template sections. Include a valid issue reference after “Fixes #”, attach before-and-after visual proof or write “N/A” with a reason, complete the testing checklist, and summarize the change and rationale in the requested …
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly identifies the main change: sending mobile page haptic events through the bridge notify channel. The phase references do not obscure the purpose.
Full details: Description check

Explanation

The description gives detailed implementation and verification information, but it omits required template sections, including the Linked Issue, Visual Proof or an explicit N/A explanation, checklist confirmations, and the requested structured ELI5, Why, and Testing sections.

Resolution

Add all required template sections. Include a valid issue reference after “Fixes #”, attach before-and-after visual proof or write “N/A” with a reason, complete the testing checklist, and summarize the change and rationale in the requested sections.

✨ Finishing Touches 💡 2
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

`GRANT_NAME_PATTERN` accepts `native.haptics.trigger` — it admits `native.<a>.<b>`
with lowercase segments, which is why it rejected `native.media.readChunk` and
rejects `navigate-back`, not a dotted name as such. So four comments claiming a route
declaring the notify's own name would have its bundle refused were false, and they
are gone: the grant is a token because the notify table's grants are tokens, a notify
not being a verb, and the dotted names in `MOBILE_WEB_SHELL_GRANTS` are spread from
the verb table alone.

Also folded, with the false claim: `implementedPageRoutes` filters on
`grants.every(implementsGrant)`, so a token every page route declares couples the
whole set to a shell that carries it — against one without it, no page route is
served at all and the phone renders five native screens. Stated in the function's
docstring and beside the census's derived list, and pinned: the same declaration
under a grant this build does not implement comes back empty, with the token-free
route as the control. Removing `BRIDGE_HAPTICS_GRANT` from `MOBILE_WEB_SHELL_GRANTS`
reds that case.

`%#` consumes no argument, so the web seam's five cases were titled with the whole
function body; the kind is the first element now and `%s` names it. One 110-char
comment line in `bridge-client-notifications.ts` wrapped to the file's 100; the two
still over it there are main's.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes — the page's haptics stop being no-ops and become a notify the shell plays on the device, with a per-route grant and a census that derives it:

  • The wire arm — new native.haptics.trigger notify in bridge/bridge-haptics-notify.ts, carrying one of a closed five-kind enum; spread into the envelope's notify union so the envelope file stays under its line cap. No version bump; an unknown kind fails the whole frame.
  • The token — haptics, a single grant rather than the dotted notify name (GRANT_NAME_PATTERN forbids a dotted grant), added to BRIDGE_NOTIFY_GRANTS and MOBILE_WEB_SHELL_GRANTS.
  • The page side — haptics.web.ts gains publishHapticsNotifier (wired by web-entry/index.tsx to client.notifyHaptics) and each of the five functions posts its own kind; refused or unpublished is a silent no-op.
  • The shell side — required onHaptic on BridgeHostOptions, dispatched in bridge-host.ts behind the grant gate, mapped by page-haptics.ts to the app's existing five functions so the Platform.OS split is written once.
  • Census and tests — config/scripts/mobile-web-app-haptics-seam.* walks each route closure, asserts the .web seam is in and the native sibling out, and derives the granted route list from the closures; the native sibling is an explicit non-posting control. Envelope, refusal, dispatch, page-seam, byte-cost and grant-pin cases all read as real assertions. All five routes declare haptics.

I verified the gating on both halves end to end and found no correctness bug. A page without the grant short-circuits before post, so nothing is ever sent to a shell that would refuse the closed notify, and the shell re-checks the grant before calling onHaptic.

ℹ️ Pre-haptics app builds fall back to native on all five page routes

implementedPageRoutes (mobile/src/mobile-web-shell/page-route-policy.ts) drops any route whose declared grants the shell does not all implement, and the session then falls back to the native screen. This PR adds haptics to all five routes, so an app build older than this shell code renders every web page natively once the host serves the new bundle — a whole-route fallback, not merely silent haptics. This is the documented behaviour ("old app against a new bundle lands on a screen that works"), and it is inherent to the per-route grant model, but it widens the set of routes that require a newer app: /h/[hostId] and agent-history previously needed only navigate+storage.

Technical details
# Older app builds lose the web pages, not just their haptics

## Affected sites
- `mobile/src/mobile-web-shell/page-route-policy.ts` — `implementedPageRoutes` filters on `route.grants.every(implementsGrant)`.
- `mobile/src/mobile-web-shell/mobile-web-shell-session.ts` — `onManifestRead` reads `implementedPageRoutes(manifest.routes)` and stays `NATIVE_ROUTE` when the pathname is not among them.
- `config/scripts/mobile-web-page-routes.mjs` — all five entries now declare `haptics`.

## Why it matters
The page half already degrades on its own: `notifyHaptics` is gated on `hasGrant('haptics')`, so a route that is rendered but not granted haptics is simply quiet. Declaring `haptics` on the route is required to *get* the grant, so there is no per-notify alternative in the current model. The consequence is that an app build predating this shell code can no longer render any of the five page routes once the bundle is served.

## Open questions for the human
- Is a whole-route native fallback for pre-`haptics` app builds the intended rollout, or should the bundle gate/version the page routes to avoid dropping a working web page for that population?

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ No new issues found.

Reviewed changes — delta since 091f02b (772c2db): a documentation and test fold with no wire, grant, kind, or byte change.

  • Corrected the token rationale — the earlier comments justified the single haptics token with a claim that GRANT_NAME_PATTERN refuses a dotted grant. It does not (native.<a>.<b> matches), so the reason was wrong. The comments in bridge-haptics-notify.ts, bridge-notify-grants.ts, bridge-notify-grants.test.ts, and page-route-policy.ts now give the real one: the notify table's grants are tokens because a notify is not a verb, and the dotted names in MOBILE_WEB_SHELL_GRANTS come from the verb-table spread.
  • Pinned the route-availability coupling — implementedPageRoutes now documents that every(implementsGrant) sends a route native whole when any one of its grants is missing, and page-route-policy.test.ts adds a case for a route carrying haptics plus a token-free control. This is the mechanism behind the five-route fallback flagged in the prior review; it is now stated and tested rather than implicit.
  • Test-title and comment cleanup — page-haptics.test.ts puts the kind first so %s names the case instead of printing the function body, and a comment in bridge-client-notifications.ts is wrapped.

The only concern from the prior review — pre-haptics builds rendering all five page routes natively — is now documented in the census test, in implementedPageRoutes's docstring, and in the policy test, so it is no longer silent. Nothing here changes behavior.

Pullfrog  | View workflow run | Using DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

@Jinwoo-H
Jinwoo-H merged commit c77a82f into main Sep 21, 2026
32 checks passed
@Jinwoo-H
Jinwoo-H deleted the ota-c7-10e-haptics branch September 21, 2026 04:29
Jinwoo-H added a commit that referenced this pull request Sep 21, 2026
…page closure (#21908)

#21864 (haptics on the page) and #21871 (mermaid on the page) were each
green against a main that lacked the other. Together, `haptics.web.ts`
reaches `bridge-haptics-notify.ts` inside the session route's closure, so
the module pin recorded by #21871 reads 4324 on main, not 4323. Pin the
measured count and name the module.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
Jinwoo-H added a commit that referenced this pull request Sep 21, 2026
Main at 2d697a4, which carries #21908's re-pin of the session route's module
count. One conflict, the pin itself, plus `27a0889dcf`'s relay test arriving
unconflicted.

Resolved by keeping this branch's `SESSION_ROUTE_MODULES = 4284` and folding
#21908's account into the one explanation the docstring already holds. Re-measured
on the merged tree with the four postinstall generators run first rather than
carried over: 4284 modules, 934 local, with
`src/mobile-web-shell/bridge/bridge-haptics-notify.ts` read out of the closure by
name rather than inferred from the total.

What #21908 adds to the account, and what this branch could not say on its own:
C7.10 item E (#21864) and mermaid (#21871) were each green against a main that
lacked the other, which is how main came to hold 4323 while measuring 4324. The
module reaches this branch's 4284 by that same route and not by anything this
branch did. The constant's own comment is now the short form and points at the
docstring, so the two explanations read once rather than twice.

Nothing under `mobile/` moves in this merge. It changes exactly two files here,
the closure test and `src/relay/omp-fresh-launch-environment.test.ts`, so the
mobile suite is not re-run; mobile tsc is, and is clean.

Claude-Session: https://claude.ai/code/session_01JNnE9qzUZMMnqpZWCqM3nb
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