docs(slider): how to open your own app page and route to it in Nuxt - #357
Merged
Merged
Conversation
From a production incident (#356): the SDK delivered the parameter correctly, the middleware recognised it, and the slider still showed the app's main page — with no error raised anywhere. The cause was Nuxt, not the SDK, but the docs are where a developer looks first when a slider shows the wrong screen, and they could not tell you the SDK's half had succeeded. Slider page: - what the portal does with each argument — it re-opens your own registered handler URL (openPath is the one for portal paths, and pointing it at an app page 404s, which reads as 'sliders cannot host app pages'); the whole argument object arrives as PLACEMENT_OPTIONS, so needs no placement.bind; and bx24_width below your mobile breakpoint silently renders the mobile layout - the Nuxt routing half, with the failure stated as a warning: a redirect RETURNED from route middleware is discarded when the entry route is prerendered, because Nuxt hydrates on the bare path and then restores the original URL past the guards. Not limited to nuxt generate — nitro.prerender .routes and crawlLinks reach it too, and it is unaffected by what serves the files. Includes the onNuxtReady variant and the measured table of where a navigation can be issued from - the two details that each cost the reporting team a round: compare paths tolerating a trailing slash, and take the query from location.search rather than to.query - a troubleshooting checklist for one symptom with several unrelated causes, including that steps 2-3 reproduce with no portal involved Placement page: PLACEMENT_OPTIONS can arrive as a JSON string with unguaranteed key case, so options?.place can be undefined with no error; and isSliderMode is derived from PLACEMENT_OPTIONS.IFRAME, so it must not be used to decide whether placement data arrived — gating diagnostics on it silences them precisely when the data is missing. Skill b24jssdk-frame-ui carries the same guidance plus three anti-patterns, so generated code gets the variant that survives a prerendered route. Refs #356 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01F22e2ft66y7nuBJjzdThBr
…tely The example is Nuxt auto-imports (defineNuxtRouteMiddleware, navigateTo, useNuxtApp, onNuxtReady) plus two app-level helpers. None of them exist in the isolated context docs:typecheck-blocks compiles in, so the block is un-checkable rather than unfixed — which is what @check-ignore is for. That took the marker count from 50 to 51, one over the warning threshold, so the threshold moves with it and records why. The comment on that constant asks for exactly this: raise it deliberately, do not let it creep silently. Refs #356
…credential log Review panel, security lens, twice — refuted both times as not-worsened-here, and taken anyway, because both are places where our own documentation contradicts our own rules. The middleware carries the whole query into the redirect target, APP_SID included. That is correct and necessary — the target screen needs the portal's parameters — but it puts a session identifier into a router history entry and into route.fullPath, and a reader sending fullPath to an error reporter would never learn that from the page. Now stated, with what to do about it. Troubleshooting step 1 said "Log $b24.placement.options". That object can carry the portal's query parameters, and this repo forbids exactly that: AGENTS.md's no-secrets-in-logs rule, enforced in SDK source by local/no-credential-in-logger. Advising in documentation what we reject in code is not a defensible split, so the step now asks for key names and the one value being diagnosed. Also aligns the skill's copy of the middleware with the page's: it had dropped the navigation-failure check, which teaches silently losing a failed redirect — the exact bug class the page exists to explain. Refs #356
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.
Closes #356.
From a production incident: the SDK delivered the parameter correctly, the middleware recognised it, and the slider still showed the app's main page — with no error raised by anything. The cause was Nuxt, not the SDK. But the docs are where a developer looks first when a slider shows the wrong screen, and today they cannot tell you that the SDK's half of the job succeeded.
Slider page
What the portal does with each argument — three things that each sent someone down a wrong path:
openPathis the one for portal paths, and pointing it at an application page 404s — which reads as "sliders cannot host app pages" and is a frequent wrong turn;PLACEMENT_OPTIONS, soplaceis an ordinary call parameter and needs noplacement.bind;bx24_widthbelow your own mobile breakpoint silently renders the mobile layout.The Nuxt routing half, stated as a warning because the failure is silent:
Worth stressing that this is not just
nuxt generate:nuxt buildprerenders anything innitro.prerender.routes, and withcrawlLinksanything reachable by a link. The report measured it served both by nginx and by Nitro — identical failure, so what serves the page is irrelevant.Includes the
onNuxtReadyvariant, the measured table of where a navigation can be issued from, and the two details that each cost the reporting team a round: compare paths tolerating a trailing slash (a static server serves/app/, the router resolves/app, and a strict!==cancels every redirect), and take the query fromlocation.searchrather thanto.query.A troubleshooting checklist for the symptom, since several unrelated causes produce it and none raises an error. Including the point that steps 2–3 reproduce with no portal involved — serve the built app and open
/<page>?place=<place>.Placement page
PLACEMENT_OPTIONScan arrive as a JSON string, with key case not guaranteed across entry points — sooptions?.placecan beundefinedwith no error, which is the same symptom as the parameter never arriving.And
isSliderModeis derived fromPLACEMENT_OPTIONS.IFRAME, so it must not be used to decide whether placement data arrived at all. The original team gated slider diagnostics on it, so the log line went quiet exactly when the data it was diagnosing was missing.Skill
b24jssdk-frame-uicarries the same guidance plus three anti-patterns, so generated code gets the variant that survives a prerendered route rather than the one that fails silently on it.The one deliberate debt
The middleware example is built from Nuxt auto-imports and two app-level helpers, none of which exist in the isolated context
docs:typecheck-blockscompiles in. It carries@check-ignorewith that reason — un-checkable rather than unfixed.That took the marker count from 50 to 51, one over the warning threshold, so
CHECK_IGNORE_WARN_THRESHOLDmoves to 51 and records why. The comment on that constant asks for exactly this — raise it deliberately, don't let it creep silently.Out of scope, raised in the issue rather than dropped
b24sdk-examples, a different repository.placement.option('place')— a parsing accessor that tolerates the JSON-string and key-case variance — is an API change, not documentation, and should be decided on its own. The docs now describe the hazard so an app can defend itself today.Verification
docs-lint --strict0/0,docs-typecheck-blocks153 blocks 0 errors,docs-link-check0 broken,md-internal-links0 broken,lint:mdclean over 21 files,check-v3-method-refsclean,skills:typecheckpasses, docs-lint's own 48 script tests pass.🤖 Generated with Claude Code
https://claude.ai/code/session_01F22e2ft66y7nuBJjzdThBr
Generated by Claude Code