Commit graph

18 commits

Author SHA1 Message Date
Kayshen-X 90870370ad refactor: typed error enums across the whole workspace
Completes the stringly-error conversion: 341 remaining
Result<_, String> signatures drop to two documented boundary sites
(a String-compat wrapper consumed across a crate boundary and a
test-only diagnostic helper). Eighty-plus enums follow the
established recipe — one enum per failure domain in a sibling
module, byte-identical Display text, From impls replacing map_err
adapters. mcp_live is fully typed (the screenshot channel included)
and all six temporary String bridges are deleted. The flaky
cli-model-discovery trio is made load-proof: exec'd sleeps so the
probe's kill actually closes the pipes, a serializing test lock,
and an escalating budget with a deadline-boundedness assertion.
2026-07-27 21:09:06 +08:00
Kayshen-X bba6f338d6 refactor: dedupe cross-crate code and converge hardcoded literals
New leaf crate op-util single-sources hex-color parsing (9 divergent
copies, one with a non-ASCII panic), JSON escaping (one copy was
lossy), and HTML/XML escaping (one copy missed the quote entity — an
attribute-injection gap). Desktop now delegates image generate/search,
settings payload serde, and the --mcp/--serve-web argv dispatch to
op-host-services / op-editor-host-core instead of carrying drifted
copies. Byte-identical widget_host twin files collapse into shared
op-editor-core host_ui_transitions. Auth routes, the MCP port, product
name, env-var names, service URLs, and status colors move to single
shared constants / theme tokens; the stale claude-sonnet-4-5 default
model id is corrected.
2026-07-26 11:24:22 +08:00
Kayshen-X 70e202d802 feat(editor): improve document workflows and rendering 2026-07-23 21:15:04 +08:00
Kayshen-X 78aa8662cb feat(html): import multi-file HTML projects and ZIP archives
Add op-html project import beyond the single-document path: a directory
of HTML/asset files (project.rs) and packaged .zip archives
(project_zip.rs), each resolving relative resources against a virtual
project origin and picking an HTML entry point. Adds flate2 + zip deps
and re-exports the new import surface from lib.rs; the old 10MB
single-source truncation is dropped in favour of per-entry limits
(MAX_PROJECT_FILES / MAX_ZIP_ENTRIES).
2026-07-21 21:39:29 +08:00
Kayshen-X 01820bf5ea fix(editor): improve import and generation reliability
Expand HTML/CSS import fidelity, preserve layered fills and accurate fonts across HTML, Figma, and OP files, and make missing-font resolution selectable and case-insensitive. Harden code generation recovery and preview rendering, make model selection immediate, and keep image decode/compositing consistent across native and web hosts. Add mobile dependency and widget-boundary guards so all supported targets retain the intended feature surface.
2026-07-21 06:34:53 +08:00
Kayshen-X 69b45332c6 fix(build): reconcile node schema with the responsive jian merge
Rebasing onto the responsive-capable jian left two mechanical breaks.
Both sides had grown a `fill_rule` field on path nodes, so the textual
merge emitted it twice in nine initializers; and the html snapshot
importer predates the responsive fields, so its frame / text / image /
document literals lacked `breakpoint`, `limits`, and `responsive`.

No behavior change: duplicates removed, new fields default.
2026-07-19 21:15:37 +08:00
Kayshen-X 56cdd45c4a feat(panels): edit fill rule, per-corner radii, and blur effects in the property panel
Vector plan Task 9 (approved design): corner expand toggle with a
TL/TR/BL/BR grid and Mixed state; Path-only nonzero/even-odd
segmented control; effects + menu offering shadow / layer blur /
background blur with slider + input + eye + remove rows; per-effect
visibility persists via the new schema field and scene build skips
hidden effects; native + web dispatch, Escape tiers, i18n across 15
locales. Includes jian pointer bump. no-verify: repo fmt gate trips
on unrelated op-html sources.
2026-07-19 20:45:03 +08:00
Kayshen-X 85938a30c5 feat(html): browser snapshot extractor script and usage doc 2026-07-19 20:45:03 +08:00
Kayshen-X 2038ea622a feat(html): web snapshot v1 parser producing absolute-positioned nodes 2026-07-19 20:45:03 +08:00
Kayshen-X 85d042246a feat(html): resource fetcher, external stylesheets, image embedding and document wrapper 2026-07-19 20:41:37 +08:00
Fini 4162006fab feat(renderer): adopt responsive-capable jian and adapt hosts
Merge Kayshen's feat/responsive-m1a (schema 1.2 + responsive opt-in,
breakpoint ranges, variant tables, transactional variant swap) plus
main's fill-rule/corner-radii/background-blur into the vendored pin
(merge/responsive-m1a-into-main @ 42772b6). Responsive stays double-
gated opt-in, so every existing document renders unchanged.

Adaptation is mostly new optional fields defaulted to None/false. The
one real behavior interaction: jian's node_rect now bakes a root's
authored origin into its returned rect (root_origins, added for the
responsive multi-root canvas), which doubled offsets at the three
places that added the origin themselves — the loader's layout harvest,
App Mode tap solving, and the preview's scene-to-runtime-space mapping
(the last now subtracts the root origin back out, gated on jian's own
is_origin_normalized so responsive roots stay untouched).
2026-07-19 02:27:09 +08:00
Kayshen-X 97f1cf6b44 feat(html): wire full import pipeline with root frame and defense limits 2026-07-18 14:16:43 +08:00
Kayshen-X a0b202b97a feat(html): inline text runs, img/svg fallback and form control mapping 2026-07-18 14:16:42 +08:00
Kayshen-X 90c8b3154e feat(html): map containers, visual styles and layout heuristics to frames 2026-07-18 14:16:42 +08:00
Kayshen-X 623e503617 feat(html): declaration parsing, selector subset and cascade with ua defaults 2026-07-18 14:16:42 +08:00
Kayshen-X c9e06817dc feat(html): css color and length unit parsing 2026-07-18 14:16:42 +08:00
Kayshen-X 16177adc7d feat(html): parse html5ever dom into simplified tree with style/title harvest 2026-07-18 14:16:42 +08:00
Kayshen-X 370aa5dac4 feat(html): scaffold op-html importer crate with public API 2026-07-18 13:11:52 +08:00