Nebula Product Quality
Treat each change as an operator workflow, not an isolated component. Establish the
behavioral contract before editing, test it through the real entry point, and do not
claim completion without evidence for every applicable gate.
Apply the repository's docs/design/interface-principles.md alongside these gates:
icon-first secondary controls, minimal copy, subtle styling and accessible actions.
1. Establish the contract
Before implementation:
- Name the operator journey and its real entry point.
- List the state owners involved: URL, browser storage, React state, Core database,
provider or harness session, workspace, and connection state.
- Write observable invariants. Include persistence and responsive invariants when
relevant, such as “the selected chat and transcript survive reload” or “the
focused composer remains inside the visual viewport.”
- Enumerate the lifecycle: discover, create, select, use, stream, interrupt,
background, reconnect, refresh, fork or retry, delete or revoke.
- Mark each lifecycle step applicable, not applicable with a reason, or required.
Do not begin with CSS selectors or endpoint shapes. Begin with what the operator
must be able to accomplish and observe.
2. Inspect the complete path
Trace every required lifecycle step across UI, API client, Core route, durable
storage, and provider or harness adapter. Identify duplicate state ownership and
resolve authority explicitly. Prefer:
- durable server state for transcripts, lineage, activity, and resumable work;
- the URL for shareable or reloadable navigation identity;
- browser storage only for device-local preferences and a documented fallback;
- component state only for transient presentation and unsent input.
Avoid fixing a state-ownership defect with an unrelated CSS or timing workaround.
Avoid adding vendor-specific UI when a normalized component can represent the
capability.
3. Build tests before claiming the fix
Add regression coverage at the layer where the defect escaped:
- Unit or component tests for deterministic transformations and local states.
- Mocked Playwright tests for loading, empty, failure, long-content, focus, touch,
accessibility, and exact responsive geometry.
- Real-Core Playwright tests for persistence, mutations, streaming, reconnect,
refresh, authorization mode, and workspace behavior.
- A production-bundle LAN check when origin, cookies, WebSockets, PWA behavior,
filesystem location, or mobile browser behavior is involved.
Do not accept a mocked API test as proof of persistence or reconnection. Do not
accept a one-off browser script as a substitute for a committed regression test.
Read quality-gates.md for the required matrices and
evidence format.
4. Dogfood the operator journey
Use the running product through the same visible controls the operator uses. For a
session feature, exercise one continuous session through all applicable lifecycle
steps. For a mobile feature, focus the real input, open the software keyboard when
physical-device access exists, rotate when relevant, background and resume, and
verify that content remains reachable without horizontal clipping.
Record the origin, build type, browser engine/profile, viewport, and workflow
result. Clearly distinguish physical-device testing, device emulation, and a
resized desktop viewport.
5. Run the release gates
Run every applicable gate in the reference matrix. Ensure mobile browser projects
are permanent entries in Playwright configuration rather than ad hoc invocations.
At minimum, interface work requires:
- relevant unit/component tests;
- relevant Playwright tests in desktop Chromium and mobile Chromium;
- relevant Playwright tests in mobile WebKit;
- a production build;
- a real-Core workflow for any server-owned or resumable state;
- a non-loopback LAN-origin check for origin-sensitive behavior.
If a gate cannot run, state that the change is incomplete or partially verified.
Never convert “not tested” into “supported,” “fixed,” or “complete.”
6. Report evidence
Lead the handoff with the operator-visible outcome. Then report:
- workflow exercised;
- automated commands and pass/fail counts;
- browser engines, device profiles, and whether each was emulated or physical;
- live origin and production/development build type;
- any skipped gate and the resulting limitation.
Do not use a generic “tests passed” statement when the required product journey
was not exercised.
1---2name: nebula-product-quality3description: Enforce end-to-end product quality for Nebula interface, mobile, LAN, chat/session lifecycle, provider, harness, workspace, and other operator-visible changes. Use whenever implementing, fixing, reviewing, or claiming completion of a workflow that an operator reaches through the Nebula UI, especially changes under ui/, API-to-UI integrations, persistence/reconnect behavior, responsive layouts, or browser security boundaries.4---56# Nebula Product Quality78Treat each change as an operator workflow, not an isolated component. Establish the9behavioral contract before editing, test it through the real entry point, and do not10claim completion without evidence for every applicable gate.1112Apply the repository's `docs/design/interface-principles.md` alongside these gates:13icon-first secondary controls, minimal copy, subtle styling and accessible actions.1415## 1. Establish the contract1617Before implementation:18191. Name the operator journey and its real entry point.202. List the state owners involved: URL, browser storage, React state, Core database,21 provider or harness session, workspace, and connection state.223. Write observable invariants. Include persistence and responsive invariants when23 relevant, such as “the selected chat and transcript survive reload” or “the24 focused composer remains inside the visual viewport.”254. Enumerate the lifecycle: discover, create, select, use, stream, interrupt,26 background, reconnect, refresh, fork or retry, delete or revoke.275. Mark each lifecycle step applicable, not applicable with a reason, or required.2829Do not begin with CSS selectors or endpoint shapes. Begin with what the operator30must be able to accomplish and observe.3132## 2. Inspect the complete path3334Trace every required lifecycle step across UI, API client, Core route, durable35storage, and provider or harness adapter. Identify duplicate state ownership and36resolve authority explicitly. Prefer:3738- durable server state for transcripts, lineage, activity, and resumable work;39- the URL for shareable or reloadable navigation identity;40- browser storage only for device-local preferences and a documented fallback;41- component state only for transient presentation and unsent input.4243Avoid fixing a state-ownership defect with an unrelated CSS or timing workaround.44Avoid adding vendor-specific UI when a normalized component can represent the45capability.4647## 3. Build tests before claiming the fix4849Add regression coverage at the layer where the defect escaped:5051- Unit or component tests for deterministic transformations and local states.52- Mocked Playwright tests for loading, empty, failure, long-content, focus, touch,53 accessibility, and exact responsive geometry.54- Real-Core Playwright tests for persistence, mutations, streaming, reconnect,55 refresh, authorization mode, and workspace behavior.56- A production-bundle LAN check when origin, cookies, WebSockets, PWA behavior,57 filesystem location, or mobile browser behavior is involved.5859Do not accept a mocked API test as proof of persistence or reconnection. Do not60accept a one-off browser script as a substitute for a committed regression test.6162Read [quality-gates.md](references/quality-gates.md) for the required matrices and63evidence format.6465## 4. Dogfood the operator journey6667Use the running product through the same visible controls the operator uses. For a68session feature, exercise one continuous session through all applicable lifecycle69steps. For a mobile feature, focus the real input, open the software keyboard when70physical-device access exists, rotate when relevant, background and resume, and71verify that content remains reachable without horizontal clipping.7273Record the origin, build type, browser engine/profile, viewport, and workflow74result. Clearly distinguish physical-device testing, device emulation, and a75resized desktop viewport.7677## 5. Run the release gates7879Run every applicable gate in the reference matrix. Ensure mobile browser projects80are permanent entries in Playwright configuration rather than ad hoc invocations.81At minimum, interface work requires:82831. relevant unit/component tests;842. relevant Playwright tests in desktop Chromium and mobile Chromium;853. relevant Playwright tests in mobile WebKit;864. a production build;875. a real-Core workflow for any server-owned or resumable state;886. a non-loopback LAN-origin check for origin-sensitive behavior.8990If a gate cannot run, state that the change is incomplete or partially verified.91Never convert “not tested” into “supported,” “fixed,” or “complete.”9293## 6. Report evidence9495Lead the handoff with the operator-visible outcome. Then report:9697- workflow exercised;98- automated commands and pass/fail counts;99- browser engines, device profiles, and whether each was emulated or physical;100- live origin and production/development build type;101- any skipped gate and the resulting limitation.102103Do not use a generic “tests passed” statement when the required product journey104was not exercised.