feat(deeplink): add the notification, settings and billing routes - #146
Merged
Conversation
Part 3 of #144, navigate half. A third trust class joins confirm and silent: navigate routes only move the user to a screen they could already reach, so they act without a prompt but never perform an action — billing opens the account section and deliberately starts no checkout. SettingsSection becomes a runtime list so a link's section can be checked rather than trusted; the store keeps the notification centre's open state so a link can raise it, which the bell previously held in local state. The mobile shell keeps a second bell mounted behind `invisible` and the popover is portalled to the body, so each bell measures its own visibility and the off-screen one leaves the popover to the visible one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 3 of #144, the navigate half. Companion page change: VoltiusApp/web#13 (merge this first — the two whitelists must agree or a link dies in silence).
A third trust class
TRUSTgainsnavigatebesideconfirmandsilent. A navigate route only moves the user to a screen they could already reach, so it needs no prompt — but it must never act:billingopens the account section and deliberately does not start a checkout.RouteOfClassalready derives the type split, soNavigateIntentfalls out of the existing machinery;UnpromptedIntentis the union of silent and navigate, and the store dispatches by trust class rather than by a second list of route names.notificationn, capped at 200 charssettingssection, checked against the real section listopenSettings(section)billingopenSettings("account")Two things the design turned up
mcpis not a settings section. #144 listedsettings?section=mcpas the notable case, but MCP settings live insideintegrations. Rather than trust the string,SettingsSectionis inverted:SETTINGS_SECTIONSis now the runtime source of truth and the type derives from it, so the codec checks a section instead of casting one.#settings?section=mcpis rejected, with a test saying why.Notification ids are not durable. Inbox entries are re-derived from server state on every reconcile (
teamInbox.ts), so a link can only name an id, never guarantee it. An unknown id opens the centre on the full list rather than reporting an error.The bell
NotificationBellheld its popover in localuseState, so nothing outside could open it; that moves touiStore. The mobile shell keeps a second bell mounted behindinvisible(MobileSftpScreen asTab) and the popover is portalled to the body, where an ancestor's visibility no longer hides it — so each bell measures its own computed visibility on open and the off-screen one leaves the popover to the visible one. Placement is measured on open rather than on click, since a deep link arrives with no pointer event.Verification
Full
CI=true vitest run: 480 files, 3690 tests, all passing.tsc --noEmitclean. New coverage: codec round-trips and rejections for all three routes, trust-class guards, store dispatch (navigate does not wait behind an open prompt, echo dedupe applies), handler effects against the realuiStore, and four bell tests including the double-bell case.Not live-clicked — the two-bell resolution is proven by a stubbed computed style, since jsdom does not inherit
visibility. Worth one pass on a device when the next Android build happens.