{"vsa":"0.9.0","type":"StaticManifest","manifestVersion":"1.0.0","viewId":"docs-v0-2-diagnostics-5","title":"Luxel compiler diagnostics (5) · Docs v0.2","requires":[{"name":"zone.text","version":"^1.0.0"}],"optional":[{"name":"render.dom","version":"^1.0.0"},{"name":"projection.slots","version":"^1.0.0"}],"trustDomain":"self","dataClass":"public","zones":[{"zoneId":"l-1","kind":"text","label":"Luxel"},{"zoneId":"l-2","kind":"text","label":"Docs"},{"zoneId":"l-3","kind":"text","label":"Demo"},{"zoneId":"l-4","kind":"text","label":"Numbers"},{"zoneId":"l-5","kind":"text","label":"Security"},{"zoneId":"l-6","kind":"text","label":"Releases"},{"zoneId":"l-7","kind":"text","label":"Roadmap"},{"zoneId":"l-8","kind":"text","label":"Blog"},{"zoneId":"l-9","kind":"text","label":"Español"},{"zoneId":"t-10","kind":"text","label":"Docs v0.2"},{"zoneId":"l-11","kind":"text","label":"Docs v0.1: 0.1.0 betas →"},{"zoneId":"l-12","kind":"text","label":"Search documentation →"},{"zoneId":"t-13","kind":"text","label":"Start"},{"zoneId":"l-14","kind":"text","label":"Overview"},{"zoneId":"l-15","kind":"text","label":"Getting started"},{"zoneId":"l-16","kind":"text","label":"Primeros pasos"},{"zoneId":"l-17","kind":"text","label":"Concepts"},{"zoneId":"t-18","kind":"text","label":"Guide"},{"zoneId":"l-19","kind":"text","label":"Views"},{"zoneId":"l-20","kind":"text","label":"Screens"},{"zoneId":"l-21","kind":"text","label":"Testing screens"},{"zoneId":"l-22","kind":"text","label":"Forms"},{"zoneId":"l-23","kind":"text","label":"Collections"},{"zoneId":"l-24","kind":"text","label":"Charts"},{"zoneId":"l-25","kind":"text","label":"Polling"},{"zoneId":"l-26","kind":"text","label":"Languages"},{"zoneId":"l-27","kind":"text","label":"Server"},{"zoneId":"l-28","kind":"text","label":"Sessions"},{"zoneId":"l-29","kind":"text","label":"Production"},{"zoneId":"l-30","kind":"text","label":"Behind a gateway"},{"zoneId":"l-31","kind":"text","label":"Tooling"},{"zoneId":"l-32","kind":"text","label":"From React or Next.js"},{"zoneId":"t-33","kind":"text","label":"Reference"},{"zoneId":"l-34","kind":"text","label":"Typical React mistakes"},{"zoneId":"l-35","kind":"text","label":"API"},{"zoneId":"l-36","kind":"text","label":"Diagnostics"},{"zoneId":"l-37","kind":"text","label":"Support matrix"},{"zoneId":"t-38","kind":"text","label":"Security"},{"zoneId":"l-39","kind":"text","label":"Security guide"},{"zoneId":"l-40","kind":"text","label":"Threat model"},{"zoneId":"l-41","kind":"text","label":"Claims and evidence"},{"zoneId":"t-42","kind":"text","label":"Project"},{"zoneId":"l-43","kind":"text","label":"Known gaps"},{"zoneId":"l-44","kind":"text","label":"Upgrading to 0.2.0-alpha.1"},{"zoneId":"l-45","kind":"text","label":"Changelog"},{"zoneId":"l-46","kind":"text","label":"Index of all sections"},{"zoneId":"t-47","kind":"text","label":"Luxel v0.2 · Reference · part 5 of 5"},{"zoneId":"t-48","kind":"text","label":"Luxel compiler diagnostics (5)"},{"zoneId":"t-49","kind":"text","label":"Code"},{"zoneId":"t-50","kind":"text","label":"Rule"},{"zoneId":"t-51","kind":"text","label":"Severity"},{"zoneId":"t-52","kind":"text","label":"When"},{"zoneId":"t-53","kind":"text","label":"What to write instead"},{"zoneId":"t-54","kind":"text","label":"LUXEL-E066"},{"zoneId":"t-55","kind":"text","label":"logout"},{"zoneId":"t-56","kind":"text","label":"error"},{"zoneId":"t-57","kind":"text","label":"Sprint 12.3 (C15): a ‹Logout> the build cannot compile to its sign-out form. The form posts to one fixed address and the server answers with one fixed redirect, so an app has one destination: to (or, without it, the view's loginView) names "},{"zoneId":"t-58","kind":"text","label":"no view or page of luxel.config, or one not served in the variant of home, or one that is not public (the visitor arrives without a session, and the host's route guard would redirect a private view to its loginView); two ‹Logout> of the app "},{"zoneId":"t-59","kind":"text","label":"name different destinations; the ‹Logout> is inside a form (as=\"form\": a form cannot hold another); or the view is served in a variant that does not fill templates (projection: 'slots'), where the form does not exist"},{"zoneId":"t-60","kind":"text","label":"Give every ‹Logout> the same to, a public view served in the variant of home, and place it outside the forms; in a view of another kind of variant, sign out with an ‹Action> whose handler calls ctx.signOut()"},{"zoneId":"t-61","kind":"text","label":"LUXEL-E057"},{"zoneId":"t-62","kind":"text","label":"throttled-ignored"},{"zoneId":"t-63","kind":"text","label":"error"},{"zoneId":"t-64","kind":"text","label":"Sprint 11 (red team RT-4): accountLimit: 'handler' and a sign-in handler that never reads ctx.throttled (the per-account limit would be gone)"},{"zoneId":"t-65","kind":"text","label":"Read ctx.throttled and ask for a second factor, or use refuse / delay"},{"zoneId":"t-66","kind":"text","label":"LUXEL-W004"},{"zoneId":"t-67","kind":"text","label":"sign-in-without-identity"},{"zoneId":"t-68","kind":"text","label":"warning"},{"zoneId":"t-69","kind":"text","label":"Sprint 11 (red team RT-1): a public view's handler signs in and the view names no identity (only the per-address limit applies)"},{"zoneId":"t-70","kind":"text","label":"Add identity: '‹username field>' to the view"},{"zoneId":"t-71","kind":"text","label":"LUXEL-E056"},{"zoneId":"t-72","kind":"text","label":"static-load-session"},{"zoneId":"t-73","kind":"text","label":"error"},{"zoneId":"t-74","kind":"text","label":"Sprint 11 (ADR-049): the load of a static view reads session, userId, roles or scopes (it runs once, at start-up, for everyone; at run time its context has no session)"},{"zoneId":"t-75","kind":"text","label":"Show only what is the same for everyone, or drop static: true"},{"zoneId":"t-76","kind":"text","label":"LUXEL-E055"},{"zoneId":"t-77","kind":"text","label":"read-writes"},{"zoneId":"t-78","kind":"text","label":"error"},{"zoneId":"t-79","kind":"text","label":"Sprint 11 (ADR-050): the handler of a read event (effect: 'read') reads ctx.eventId, holds an SQL statement that writes, or calls a store's write() (its own text; a helper's write fails on the read-only connection). Sprint 12: code outside "},{"zoneId":"t-80","kind":"text","label":"the handler that reads a read's event id throws LUXEL-E055: … is a read, and a read has no event id at run time"},{"zoneId":"t-81","kind":"text","label":"Make it a write (remove effect: 'read'), or keep the handler to reading"},{"zoneId":"t-82","kind":"text","label":"LUXEL-W001"},{"zoneId":"t-83","kind":"text","label":"canvas-missing-slot"},{"zoneId":"t-84","kind":"text","label":"warning"},{"zoneId":"t-85","kind":"text","label":"A zone has no slot in the Canvas layout (Luxel Visual will not paint it)"},{"zoneId":"t-86","kind":"text","label":"Add the slot"},{"zoneId":"t-87","kind":"text","label":"LUXEL-W002"},{"zoneId":"t-88","kind":"text","label":"not-verifiable-statically"},{"zoneId":"t-89","kind":"text","label":"warning"},{"zoneId":"t-90","kind":"text","label":"luxel check: a policy needs a measurement (initialTransferKiB, scalability); the check reports it as NOT VERIFIABLE STATICALLY with any static lower bound"},{"zoneId":"t-91","kind":"text","label":"Measure it (examples/bench, a load test)"},{"zoneId":"t-92","kind":"text","label":"LUXEL-W003"},{"zoneId":"t-93","kind":"text","label":"critical-css-over-limit"},{"zoneId":"t-94","kind":"text","label":"warning"},{"zoneId":"t-95","kind":"text","label":"Sprint 8: a page's CSS is above the 4 096 B inline limit and even its first-paint part (critical CSS) is above it, so the whole CSS is linked and blocks the paint"},{"zoneId":"t-96","kind":"text","label":"Trim the rules the template uses, or split the view"},{"zoneId":"t-97","kind":"text","label":"luxel check"},{"zoneId":"t-98","kind":"text","label":"luxel check [--json] [--root ‹dir>] [--out ‹dir>] [--surface ‹file>] runs the policies of luxel.config.ts (policies) over the compiled output (codes E030–E039, W002), and, with --surface, checks a dynamic surface before projection "},{"zoneId":"t-99","kind":"text","label":"(E032–E035, E039–E042). The same checks are a library (@luxel-framework/check: checkProject, checkSurface) with the same codes; the host runs checkSurface on every surface an agent proposes and refuses it (422) on any error. Text and JSON "},{"zoneId":"t-100","kind":"text","label":"output have the shapes above."},{"zoneId":"t-101","kind":"text","label":"Examples"},{"zoneId":"t-102","kind":"text","label":"The examples below are real output: the corpus view packages/compiler/test/project/src/views/e001-onclick.view.tsx, compiled with luxel build."},{"zoneId":"t-103","kind":"text","label":"Text:"},{"zoneId":"t-104","kind":"text","label":"src/views/e001-onclick.view.tsx:8:7 - error LUXEL-E001 (no-function-handler): \"onClick\" on ‹Action> is a function. Functions never run in the browser in Luxel: there are no event handlers.\n\n"},{"zoneId":"t-105","kind":"text","label":"  8 |       ‹Action id=\"pay\" event=\"transfer.submit\" onClick={pay}>Pagar‹/Action>\n    |       ^\n  suggestion: Logic runs on the server: use ‹Action event=\"...\"> and handle the event with defineEvent. Local presentation changes go in "},{"zoneId":"t-106","kind":"text","label":"onSuccess (clear, focus)."},{"zoneId":"t-107","kind":"text","label":"JSON (luxel build --json):"},{"zoneId":"t-108","kind":"text","label":"{\n  \"code\": \"LUXEL-E001\",\n  \"severity\": \"error\",\n  \"file\": \"src/views/e001-onclick.view.tsx\",\n  \"line\": 8,\n  \"column\": 7,\n  \"rule\": \"no-function-handler\",\n"},{"zoneId":"t-109","kind":"text","label":"  \"message\": \"\\\"onClick\\\" on ‹Action> is a function. Functions never run in the browser in Luxel: there are no event handlers.\",\n"},{"zoneId":"t-110","kind":"text","label":"  \"suggestion\": \"Logic runs on the server: use ‹Action event=\\\"...\\\"> and handle the event with defineEvent. Local presentation changes go in onSuccess (clear, focus).\"\n}"},{"zoneId":"t-111","kind":"text","label":"The corpus has 32 erroneous views, one per file, each with its expected code and position on its first line. They cover 27 of the first 30 error codes (LUXEL-E000 to LUXEL-E029) and LUXEL-E066 (a ‹Logout> inside a form). The three left out "},{"zoneId":"t-112","kind":"text","label":"of the first 30 are project-level checks, not view mistakes: LUXEL-E023 (Canvas layout), LUXEL-E024 (config) and LUXEL-E027 (exposure guard). packages/compiler/test/compiler.test.ts checks every corpus view in both formats."},{"zoneId":"l-113","kind":"text","label":"Previous: Luxel compiler diagnostics (4)"},{"zoneId":"l-114","kind":"text","label":"Previous: API"},{"zoneId":"l-115","kind":"text","label":"Next: Support matrix"},{"zoneId":"l-116","kind":"text","label":"Edit this page on GitHub"},{"zoneId":"t-117","kind":"text","label":"This page: 7.9 KB of JavaScript (Luxel's shared runtime), 0 KB from your app."},{"zoneId":"t-118","kind":"text","label":"Measured when the site is built: the runtime files this page loads, compressed as they are sent."},{"zoneId":"l-119","kind":"text","label":"GitHub"},{"zoneId":"l-120","kind":"text","label":"Discussions"},{"zoneId":"l-121","kind":"text","label":"Apache-2.0"},{"zoneId":"l-122","kind":"text","label":"Ties and losses"},{"zoneId":"t-123","kind":"text","label":"Made by IntiOps. The Luxel 0.1.0 betas are on npm (0.1.0-beta.1, 0.1.0-beta.2), with an alpha of 0.2 (0.2.0-alpha.1): no external security review yet."}],"events":[],"messages":{"network":"Could not reach the server. Check your connection and try again.","unexpected":"Something went wrong. Reload the page."},"extensions":{"render.dom@1":{"root":{"el":"div","class":"site site--en page--doc","children":[{"el":"header","class":"topbar","children":[{"zone":"l-1","el":"span","class":"brand"},{"el":"div","class":"nav","children":[{"zone":"l-2","el":"span","class":"nav-link"},{"zone":"l-3","el":"span","class":"nav-link"},{"zone":"l-4","el":"span","class":"nav-link"},{"zone":"l-5","el":"span","class":"nav-link"},{"zone":"l-6","el":"span","class":"nav-link"},{"zone":"l-7","el":"span","class":"nav-link"},{"zone":"l-8","el":"span","class":"nav-link"}]},{"zone":"l-9","el":"span","class":"lang"}]},{"el":"main","class":"main main--doc","children":[{"el":"div","class":"sidebar","children":[{"zone":"t-10","el":"p","class":"sidebar-version"},{"zone":"l-11","el":"span","class":"side-link side-link--version"},{"zone":"l-12","el":"span","class":"side-link side-link--search"},{"zone":"t-13","el":"p","class":"sidebar-group"},{"el":"div","class":"sidebar-links","children":[{"zone":"l-14","el":"span","class":"side-link"},{"zone":"l-15","el":"span","class":"side-link"},{"zone":"l-16","el":"span","class":"side-link"},{"zone":"l-17","el":"span","class":"side-link"}]},{"zone":"t-18","el":"p","class":"sidebar-group"},{"el":"div","class":"sidebar-links","children":[{"zone":"l-19","el":"span","class":"side-link"},{"zone":"l-20","el":"span","class":"side-link"},{"zone":"l-21","el":"span","class":"side-link"},{"zone":"l-22","el":"span","class":"side-link"},{"zone":"l-23","el":"span","class":"side-link"},{"zone":"l-24","el":"span","class":"side-link"},{"zone":"l-25","el":"span","class":"side-link"},{"zone":"l-26","el":"span","class":"side-link"},{"zone":"l-27","el":"span","class":"side-link"},{"zone":"l-28","el":"span","class":"side-link"},{"zone":"l-29","el":"span","class":"side-link"},{"zone":"l-30","el":"span","class":"side-link"},{"zone":"l-31","el":"span","class":"side-link"},{"zone":"l-32","el":"span","class":"side-link"}]},{"zone":"t-33","el":"p","class":"sidebar-group"},{"el":"div","class":"sidebar-links","children":[{"zone":"l-34","el":"span","class":"side-link"},{"zone":"l-35","el":"span","class":"side-link"},{"zone":"l-36","el":"span","class":"side-link side-link--current"},{"zone":"l-37","el":"span","class":"side-link"}]},{"zone":"t-38","el":"p","class":"sidebar-group"},{"el":"div","class":"sidebar-links","children":[{"zone":"l-39","el":"span","class":"side-link"},{"zone":"l-40","el":"span","class":"side-link"},{"zone":"l-41","el":"span","class":"side-link"}]},{"zone":"t-42","el":"p","class":"sidebar-group"},{"el":"div","class":"sidebar-links","children":[{"zone":"l-43","el":"span","class":"side-link"},{"zone":"l-44","el":"span","class":"side-link"},{"zone":"l-45","el":"span","class":"side-link"}]},{"zone":"l-46","el":"span","class":"side-link side-link--index"}]},{"el":"section","class":"article","children":[{"zone":"t-47","el":"p","class":"doc-meta"},{"zone":"t-48","el":"h1","class":"page-title"},{"el":"div","class":"block","children":[{"el":"div","class":"table-wrap","children":[{"el":"table","class":"table","children":[{"el":"thead","children":[{"el":"tr","children":[{"zone":"t-49","el":"th"},{"zone":"t-50","el":"th"},{"zone":"t-51","el":"th"},{"zone":"t-52","el":"th"},{"zone":"t-53","el":"th"}]}]},{"el":"tbody","children":[{"el":"tr","children":[{"zone":"t-54","el":"td"},{"zone":"t-55","el":"td"},{"zone":"t-56","el":"td"},{"el":"td","children":[{"zone":"t-57","el":"span"},{"zone":"t-58","el":"span"},{"zone":"t-59","el":"span"}]},{"zone":"t-60","el":"td"}]},{"el":"tr","children":[{"zone":"t-61","el":"td"},{"zone":"t-62","el":"td"},{"zone":"t-63","el":"td"},{"zone":"t-64","el":"td"},{"zone":"t-65","el":"td"}]},{"el":"tr","children":[{"zone":"t-66","el":"td"},{"zone":"t-67","el":"td"},{"zone":"t-68","el":"td"},{"zone":"t-69","el":"td"},{"zone":"t-70","el":"td"}]},{"el":"tr","children":[{"zone":"t-71","el":"td"},{"zone":"t-72","el":"td"},{"zone":"t-73","el":"td"},{"zone":"t-74","el":"td"},{"zone":"t-75","el":"td"}]},{"el":"tr","children":[{"zone":"t-76","el":"td"},{"zone":"t-77","el":"td"},{"zone":"t-78","el":"td"},{"el":"td","children":[{"zone":"t-79","el":"span"},{"zone":"t-80","el":"span"}]},{"zone":"t-81","el":"td"}]},{"el":"tr","children":[{"zone":"t-82","el":"td"},{"zone":"t-83","el":"td"},{"zone":"t-84","el":"td"},{"zone":"t-85","el":"td"},{"zone":"t-86","el":"td"}]},{"el":"tr","children":[{"zone":"t-87","el":"td"},{"zone":"t-88","el":"td"},{"zone":"t-89","el":"td"},{"zone":"t-90","el":"td"},{"zone":"t-91","el":"td"}]},{"el":"tr","children":[{"zone":"t-92","el":"td"},{"zone":"t-93","el":"td"},{"zone":"t-94","el":"td"},{"zone":"t-95","el":"td"},{"zone":"t-96","el":"td"}]}]}]}]},{"zone":"t-97","el":"h2","class":"section-title"},{"el":"p","class":"para","children":[{"zone":"t-98","el":"span"},{"zone":"t-99","el":"span"},{"zone":"t-100","el":"span"}]},{"zone":"t-101","el":"h2","class":"section-title"},{"zone":"t-102","el":"p","class":"para"},{"zone":"t-103","el":"p","class":"para"},{"el":"p","class":"code","children":[{"zone":"t-104","el":"span"},{"zone":"t-105","el":"span"},{"zone":"t-106","el":"span"}]},{"zone":"t-107","el":"p","class":"para"},{"el":"p","class":"code","children":[{"zone":"t-108","el":"span"},{"zone":"t-109","el":"span"},{"zone":"t-110","el":"span"}]},{"el":"p","class":"para","children":[{"zone":"t-111","el":"span"},{"zone":"t-112","el":"span"}]}]},{"el":"div","class":"pager","children":[{"zone":"l-113","el":"span","class":"pager-link"},{"zone":"l-114","el":"span","class":"pager-link"},{"zone":"l-115","el":"span","class":"pager-link pager-link--next"}]},{"zone":"l-116","el":"span","class":"edit-link"}]}]},{"el":"footer","class":"footer","children":[{"zone":"t-117","el":"p","class":"jsline"},{"zone":"t-118","el":"p","class":"jsnote"},{"el":"div","class":"footer-links","children":[{"zone":"l-119","el":"span","class":"footer-link"},{"zone":"l-120","el":"span","class":"footer-link"},{"zone":"l-121","el":"span","class":"footer-link"},{"zone":"l-122","el":"span","class":"footer-link"}]},{"zone":"t-123","el":"p","class":"made"}]}]}},"projection.slots@1":{"template":"/_luxel/a/docs-v0-2-diagnostics-5.7db649ee653d.html","map":"/_luxel/a/docs-v0-2-diagnostics-5.slots.94f6a3b396f1.json"}}}