This document outlines test coverage to add after the render pipeline rewrite is fully integrated with the multi-tab UX.
Current test coverage intentionally removed a subset of specs that were tightly coupled to pre-rewrite assumptions:
- Legacy assumptions around default-export hydration behavior in preview module assembly.
- Styles diagnostics behavior that depended on old compile/lint sequencing.
- PR drawer path validation timing assumptions tied to previous field sync flow.
These should return as updated tests once the new pipeline contract is finalized.
Goal: Validate how preview entry is resolved from workspace tabs under the role: entry model.
Add specs for:
- Entry selection prefers explicit
role: entry, with documented fallback behavior only when no explicit entry is present. - Entry rename between
App.tsxandApp.jskeeps execution stable. - Entry path updates preserve directory while enforcing filename convention.
- Reload restores same entry tab and executes same source.
Goal: Reintroduce export-default tests against the final module assembly support matrix.
Add specs for:
export default () => ...in entry tab with manual render.export default class ...in React mode.function App() { ... } export default Appcompatibility.const Button = ...; export default Buttonbehavior when App wrapper is implicit or explicit.- Negative cases: unsupported default-export combinations produce deterministic diagnostics.
Goal: Ensure workspace graph resolution works across multiple component and style tabs.
Add specs for:
- Entry imports sibling component tab by relative specifier.
- Nested dependency chain (A imports B imports C) hydrates in stable order.
- Missing module path reports actionable preview error including unresolved specifier.
- Circular import emits stable error (or supported behavior) without hanging.
- Windows-style and POSIX-style separators normalize consistently in lookup keys.
Goal: Lock down expected diagnostics and status transitions for style dialects.
Add specs for:
- Sass compilation error sets diagnostics state to error with styles-scope detail.
- Less error path behavior parity with Sass.
- Switching style mode clears stale diagnostics according to final pipeline contract.
- Styles lint diagnostics and compile diagnostics coexist or prioritize per contract.
- Clearing style diagnostics does not clear unrelated component diagnostics.
Goal: Ensure app status text/class and diagnostics toggle class remain consistent.
Add specs for:
- Pending to error to neutral transitions for typecheck + lint + render.
- Multiple error sources aggregate counts correctly.
- Clearing one scope updates only corresponding status/diagnostics indicators.
- Auto-render off path keeps status stable until explicit render.
Goal: Guarantee controls are actionable only for active editor tab and panel.
Add specs for:
- Component controls hidden/inert when styles tab is active.
- Styles controls hidden/inert when component tab is active.
- Keyboard interactions in inactive panel do not mutate source.
- Tab switches maintain tool visibility state and collapse state correctly.
Goal: Verify deterministic startup and no stale state bleed between sessions.
Add specs for:
- IndexedDB workspace restore across reload preserves tabs, active tab, entry role, and paths.
- PR drawer saved config does not unexpectedly overwrite active workspace tab paths.
- New session starts clean when storage is reset in tests.
- Repository switch behavior isolates per-repo local context and config.
Goal: Revisit path validation behavior after final field sync implementation.
Add specs for:
- Reject traversal (
../) for component and styles paths. - Reject trailing slash paths for component and styles fields.
- Allow dotted segments that are not traversal.
- Entry-specific filename rule enforcement (
App.tsxorApp.js) reflected in drawer path values.
Goal: Keep suites stable as UX evolves.
Actions:
- Add helper APIs for tab activation before control interactions.
- Add one reset helper per suite to clear localStorage, sessionStorage, and IndexedDB.
- Prefer role/name selectors that match active-tab semantics.
- Avoid assertions that require hidden panel controls to be clickable.
- Entry resolution + default-export support matrix.
- Cross-tab import graph hydration.
- Styles diagnostics contract.
- Status state machine.
- PR drawer path validation synchronization.
- Persistence/isolation hardening.
Before reintroducing removed specs, the render pipeline implementation should provide a written behavior contract for:
- Entry tab selection.
- Default export support matrix.
- Style compile + lint diagnostics precedence.
- Status/diagnostics state transitions.
- Path normalization and validation across workspace tabs and PR drawer fields.