Commit graph

1587 commits

Author SHA1 Message Date
Kayshen-X f6628e2b28 refactor(editor): migrate model picker to shared select 2026-06-14 00:56:39 +08:00
Kayshen-X 8b9e0a07a7 refactor(editor): migrate font picker to shared select 2026-06-14 00:56:38 +08:00
Kayshen-X e0c041ef69 refactor(editor): migrate tracked file picker to shared select 2026-06-14 00:56:37 +08:00
Kayshen-X c68aec2560 refactor(editor): migrate fill type picker to shared select 2026-06-14 00:56:36 +08:00
Kayshen-X 609e23df2c refactor(editor): migrate shape picker to shared select 2026-06-14 00:56:35 +08:00
Kayshen-X 381a488450 refactor(editor): migrate locale picker to shared select 2026-06-14 00:56:34 +08:00
Kayshen-X aa54a0a62a fix(editor): enable web caret blinking 2026-06-14 00:56:33 +08:00
Kayshen-X ea22bad6f6 refactor(editor): centralize text input blink scheduling 2026-06-14 00:56:32 +08:00
Kayshen-X a1918303de refactor(editor): migrate canvas text edit to shared text state 2026-06-14 00:56:31 +08:00
Kayshen-X f4c339ed0a refactor(editor): centralize agent draft readiness 2026-06-14 00:56:30 +08:00
Kayshen-X ce3626da2d refactor(editor): migrate git clone form to shared text state 2026-06-14 00:56:29 +08:00
Kayshen-X 7133ab243b refactor(editor): migrate git auxiliary inputs to shared text state 2026-06-14 00:56:28 +08:00
Kayshen-X f16fffa4df refactor(editor): migrate git commit input to shared text state 2026-06-14 00:56:27 +08:00
Kayshen-X b5ecf2e4d3 refactor(editor): migrate chat model picker to shared text state 2026-06-14 00:56:26 +08:00
Kayshen-X cce1857a5d refactor(editor): migrate layer rename to shared text state 2026-06-14 00:56:25 +08:00
Kayshen-X a92b0ac57a refactor(editor): migrate chat input to shared text state 2026-06-14 00:56:24 +08:00
Kayshen-X 5c016388e6 refactor(editor): migrate property and variables inputs to shared text state 2026-06-14 00:56:23 +08:00
Kayshen-X 9d1ea838c8 fix(editor): consume jian text origin fix 2026-06-14 00:56:22 +08:00
Kayshen-X f0a264e078 refactor(editor): migrate settings inputs to shared text state 2026-06-14 00:56:21 +08:00
Kayshen-X 2dece21dfd docs(editor): update widget primitive list 2026-06-14 00:56:20 +08:00
Kayshen-X 382d2d0a87 chore(vendor): bump jian for widget review fixes 2026-06-14 00:56:19 +08:00
Kayshen-X 989dd916d9 chore(editor): drop unused dropdown sample superseded by jian-widgets Select 2026-06-14 00:56:18 +08:00
Kayshen-X d226da454b chore(vendor): bump jian for dialog primitive 2026-06-14 00:56:17 +08:00
Kayshen-X f2c6ced236 chore(vendor): bump jian for switch primitive 2026-06-14 00:56:16 +08:00
Kayshen-X 281698d95a chore(vendor): bump jian for scroll area primitive 2026-06-14 00:56:15 +08:00
Kayshen-X 8d73345cfe chore(vendor): bump jian for menu widget primitive 2026-06-14 00:56:14 +08:00
Kayshen-X 9734c1f73a chore(vendor): bump jian for select widget primitive 2026-06-14 00:56:13 +08:00
Kayshen-X 82b07847a4 chore(vendor): bump jian for text area widget view 2026-06-14 00:56:12 +08:00
Kayshen-X 5cb9d36ec5 chore(vendor): bump jian for text input widget view 2026-06-14 00:56:11 +08:00
Kayshen-X 949cb5a4b1 chore(vendor): bump jian for widget button primitive 2026-06-14 00:56:10 +08:00
Kayshen-X 9dce2957e6 chore(vendor): bump jian for shared widget tokens 2026-06-14 00:56:09 +08:00
Kayshen-X 42de84c917 refactor(editor): re-export painter contract from jian-widgets 2026-06-14 00:56:08 +08:00
Kayshen-X 0daca70f74 chore(vendor): bump jian for select-all arrow fix 2026-06-14 00:56:07 +08:00
Kayshen-X 46822b1ff5 chore(vendor): bump jian for text_input + scroll modules 2026-06-14 00:56:06 +08:00
Kayshen-X bfc8d1676b refactor(editor): unify Color::with_alpha and Color::to_jian 2026-06-14 00:56:05 +08:00
Kayshen-X d64d4a2dc4 refactor(editor): add Rect::contains, drop local rect_contains copies 2026-06-14 00:56:04 +08:00
Fini 5ba0fb62cb feat(mcp): default v1 element theme to system (spec D2)
Flip the manifest repair-layer default for v1 element kinds from
`light` to `system`, so weak-model designs adapt to the document's
light/dark axis instead of baking light-mode hex. Both prerequisites
are now in place: the orchestrator seeds the 56-token semantic palette
at run start (`-*` refs resolve at paint via scene_vars) and
every v1 builder emits numeric gap/padding in system mode. Explicit
`theme=light|dark` still wins.

ab-v9.3 validation (52 prompts × 4 arms, theme=system default):
- Rendering: 0 dangling $color-* refs across all 208 .op; 207/208
  carry the seeded palette + Mode:[Light,Dark] axis. The D2 grey-ref
  risk does not materialize at corpus scale.
- Structural inertness: theme is injected post-model by repair_args
  and only selects fills; role inference + the contrast post-pass are
  already $ref-aware (role_post_pass resolves a ref to None and skips).
  M3/M5 cannot move on the flip — glm's 15 M3 misses are 100%
  missing-role (model output), theme-independent.
- No collapse: M3 ark 81% / glm 71% / DS 85% / m3-think 94%, 0-1
  garbage per arm. Per-arm deltas vs ab-v9.2 are cross-codebase
  (Kayshen's d31734e2 edited the manifest skill + builders between
  runs) + sampling, NOT the theme flip.
2026-06-14 00:56:03 +08:00
Fini aa25cc2a7e fix(editor-ui): variables-panel wheel scroll + preset toggle test
Two failures surfaced once the casement build blocker cleared and the
`cargo test --workspace` step finally ran on v0.8.0-new:

- wheel_over_panel_scrolls_rows_and_clamps: `over_topmost_panel` ran
  first in apply_wheel and lists the variables panel, so a wheel over
  the panel was swallowed (returned true) WITHOUT ever reaching
  try_scroll_variables_panel — rows never advanced. Move the variables
  scroll handler ahead of the topmost-panel guard; it already swallows
  the wheel over its own rect, so the canvas-zoom guard still holds.

- variables_panel_preset_button_toggles_menu: the second press used a
  +58 y-offset that lands in the open dropdown's SaveCurrent row, which
  intentionally focuses the name input and keeps the popover open (TS
  parity, see anchor_press_does_not_double_toggle). Re-press the button
  itself (+22) so the test exercises the toggle it is named for.

op-host-native lib: 296 passed / 0 failed.
2026-06-13 21:07:24 +08:00
Kayshen-X 4dee479c6b chore: snapshot WIP across editor-core, editor-ui, hosts, mcp, ai-skills
Working-tree snapshot spanning op-editor-core (components, path_edit,
ref_resolve, text_edit, instance_override, image_panel), op-editor-ui
widgets (chat panel, variables, property fill, canvas overlays, ime),
op-host-desktop (chat backends, export, kit_persistence), op-host-native
(font picker, frame backend, pen press), op-mcp (batch_program), AI-skills
prompts, and regenerated shadcn-kit / iconify catalog assets.
2026-06-13 17:59:54 +08:00
Fini ebcb85a569 fix(mcp): emit numeric gap/padding in system-mode builders
theme=system audit (D2 prerequisite): the schema accepts $spacing-*
expression refs in gap/padding, but both Rust layout paths zero them
out — jian-core container_to_style and op-pen-loader gap_value fall
through Expression to 0 — so a ref collapses the layout instead of
resolving. Exactly three emission sites existed: modal_shell's card
padding ($spacing-5) and gap ($spacing-3), and toast's pill gap
($spacing-2). Emit the palette-equal numbers (24/12/8) in every mode,
same pattern as the numeric font-size toast fix (011f4104). A new
catalog-wide invariant test builds all kinds with theme=system and
rejects any expression gap/padding, so future ports can't reintroduce
the class. Color $refs are unaffected — scene_vars resolves fill and
stroke refs at paint.
2026-06-13 01:05:46 +08:00
Fini 05e1e4e2d8 feat(ai): route element manifest by model family (M4)
Replace the global OPENPENCIL_MANIFEST env gate with per-model routing:
manifest defaults ON for the families that cleared the ab-v9.2 KPI gate
(minimax 92% / ark-code 92% / glm 98% / deepseek 83%, all >=70%) and
stays OFF for models without benchmark data — the catalog is a floor
for weak models, not a ceiling for strong ones. The env var remains a
both-ways override (1/true/on forces on, 0/false/off forces off) so
op-smoke benchmarks and rollback keep their one-knob workflow.

Also plumb the selected built-in agent's model id into DesignRequest:
the production chat path always sent model:None, which routed every
model to Full-tier prompts and dead-armed both this gate and the M3
thinking policy outside op-smoke. Live-verified: glm-5.1 with no env
set engages the manifest protocol purely via routing.
2026-06-13 00:52:26 +08:00
Fini a9b0e729fd feat(ai): seed semantic palette at orchestration start
Port the TS applySemanticPalette 56-token palette (22 themed light/dark
colors on a Mode axis, 6 chart singles, 28 numerics) and wake the
dormant variables.rs seeding path. Merge semantics differ from TS:
editor-core set_variables_bulk extends (incoming wins) while TS keeps
existing values, so the snapshot computes the missing set first and
seeds only absent tokens via one MergeThemePreset; rollback removes
exactly the created names/axes when no content survives. Live-smoke
verified: generated .op carries the 56 vars + Mode axis and $color-*
refs resolve at paint.
2026-06-13 00:35:35 +08:00
Fini 9ffaf5980c fix(ai): admit painted childless frames as blank-check content
A childless Frame with explicit stroke or fill is pixel-equivalent to a
childless Rectangle, which the blank check already admits. otp_input's
empty stroked digit slots made perfect manifests read as blank
scaffolding -> retry ladder -> raw fallback degradation (ark emitted
flawless otp manifests twice and got rejected both times). Also
serialize the OPENPENCIL_MANIFEST env tests behind a shared lock --
parallel set/remove races only surfaced in full-suite runs.
2026-06-13 00:35:34 +08:00
Fini fa4130c133 feat(ai): deterministic element-kind hints for manifest sub-agents
ab-v9.1 misses were attention failures, not vocabulary failures: kinds
named literally in the brief (toolbar 5/10) still got hand-composed,
while anti-pattern-named kinds rarely missed. Token-match the subtask
label+elements text (plus the whole brief for single-section plans)
against the catalog, expand via a data-grounded synonym table, and
inject up to 6 nominations as an ELEMENT HINTS block with composite-
first and no-hand-compose rules. ab-v9.2 matrix: 51 FAIL->PASS vs 4
noise-shaped regressions; all four arms >=83% M3-pass, M5 adoption 96%.
2026-06-13 00:35:33 +08:00
Fini 461b77a054 fix(ai): manifest catalog recency placement + composite coverage teaching
Full-tier prompts run ~8k tokens and deepseek kept hand-rolling past a
top-of-prompt element catalog (ab-v9 58% vs Basic-tier 85%). Pull the
element-manifest skill out of priority order and append it last, right
above the output contract, so recency keeps the catalog in attention.
The skill's COVERAGE section now also teaches composite-first checking
instead of only naming examples.
2026-06-13 00:35:32 +08:00
Fini e7ae700678 feat(ai): keep MiniMax-M3 reasoning on design subtasks
M3 with thinking disabled drops to M2.7-level element adoption; route
design sub-agent calls through Adaptive thinking with a 16384 budget
for the M3 family while other built-in models keep Disabled+8192.
Validated by the ab-v9.2 matrix (m3-think arm 92% M3-pass).
2026-06-13 00:35:31 +08:00
Kayshen-X 9fd78d2d8a fix(editor-ui): resolve conflict markers swept into the chat panel during the rebase
The background fmt commit captured the editor-ui pick's conflicted state
mid-rebase; both sides kept (ab-v9 concurrency-chip spacing + tests_paint
module, batch tests_transcript module + footer tests), paint helpers
promoted for cross-module reuse.
2026-06-12 23:36:36 +08:00
Kayshen-X 14482a5d86 feat(variables): panel UX, variant-column color editing, theme presets, web mirror
#18 per-row management (resize edges, search with source indices, scroll
clamp, row overflow menu with delete+undo, inline hex cells), #19 variant-
column-targeted color/boolean writes (setValueForTheme parity, picker
seeds from the clicked column), #20 theme presets (.optheme io, app-level
persistence, shared preset menu), #21 full web host mirror (floating
panel replaces the read-only rail; keyboard/scroll/resize/blur routing).
Fixes the stale right-rail assertions in toolbar_panel_actions test.
Absorbs and completes the concurrent actor's variables-panel WIP.
2026-06-12 23:28:11 +08:00
Kayshen-X 3418fe60af fix(web): route iconify body parse through the widget_host boundary seam
check-widget-boundary.sh F4 forbids op_editor_ui::widgets references
outside widget_host.rs + siblings; the remote-icon fetcher now calls the
new icon_ingest wrapper instead of icon_catalog directly.
2026-06-12 23:28:10 +08:00
Kayshen-X 4c7a2a52a1 chore(build): release packaging scripts, wasm bundle gate with codegen, workspace docs + lockfile 2026-06-12 23:28:09 +08:00