openpencil/apps/web
Fini b2f1aff38f refactor(ai): delete dead visual-ref pipeline + simplify design-validation
S4 deep-dive (S4 = pen-ai-skills migration's 4th sub-project) revealed
the entire 'visual reference' pipeline is dead code:

- executeVisualRefOrchestration has ZERO call sites. ai-chat-handlers
  → generateDesign() → executeOrchestration() directly. No
  visual-ref dispatch.
- mode: 'visual-ref' (described in older comments + memory note as
  'always-triggered since 2026-03-07') does not exist anywhere in src.
- design-validation.ts's referenceScreenshot path was wired to
  getCurrentVisualReference() which was wired to a module-level
  variable that nobody ever called setCurrentVisualReference on. The
  hasReference branch was always false.

Delete the 4 dead files (~734 LOC) + simplify design-validation:
- visual-ref-orchestrator.ts (243 LOC, dead entry)
- design-system-generator.ts (174 LOC, only called by dead entry)
- design-code-generator.ts (192 LOC, only called by dead entry)
- html-renderer.ts (125 LOC, only called by dead entry, browser-only)
- design-validation.ts: drop the import + 5 clearVisualReference()
  calls + the visualRef/hasReference branch in the round loop; pass
  undefined for referenceScreenshot. The validateDesignScreenshot
  signature keeps referenceScreenshot? for a future visual-ref source.

Rust-side note: the equivalent reference-comparison vision call IS
already implemented in crates/op-orchestrator/src/validation.rs
(reference_instruction text + timeout-doubling + plumb-through), it
just always passes None today — same pattern as ScreenshotProvider:
host wires real source when ready. No Rust changes needed for this
cleanup.

DesignSystem / VisualReference interfaces in ai-types.ts kept as
type-only declarations in case a future visual-ref provider lands.
2026-05-23 19:45:54 +08:00
..
public V0.5.0 (#67) 2026-03-22 09:44:04 +08:00
server fix(ai): explicit skipped reason for builtin providers in vision validate 2026-05-09 21:20:00 +08:00
src refactor(ai): delete dead visual-ref pipeline + simplify design-validation 2026-05-23 19:45:54 +08:00
CLAUDE.md V0.7.0 (#95) 2026-04-11 23:25:13 +08:00
components.json V0.7.0 (#95) 2026-04-11 23:25:13 +08:00
dev.ts V0.7.2-bugfix (#109) 2026-04-14 21:42:56 +08:00
package.json Merge branch 'v0.8.0' of github.com:ZSeven-W/openpencil into v0.8.0 2026-05-05 22:51:00 +08:00
tsconfig.json V0.7.2-bugfix (#109) 2026-04-14 21:42:56 +08:00
vite.config.ts Merge origin/v0.8.0 into feat/rust-ification 2026-05-03 21:00:00 +08:00