Commit graph

132 commits

Author SHA1 Message Date
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 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
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 994b55f928 feat(native): host dispatch batch — pen/path press, IME routing, panel dispatchers, font enumeration
pen_press + path-edit dispatch, ime.rs preedit/commit routing with chat
anchor, font_picker/image_panel/kit dispatch modules, panel-history undo
coverage tests, geometry split (settings-hover sibling), corner-radius
image clipping + skia text italic caches. variables_panel_* excluded
(concurrent WIP).
2026-06-12 23:26:38 +08:00
Kayshen-X 56e55f1159 fix(ai): align chat input hit testing with painted text 2026-06-10 00:08:04 +08:00
Kayshen-X 86cb4c3fb8 chore(editor): checkpoint chrome WIP + web picker select-all wiring
Snapshots the full working tree: web select-all picker wiring
(op-host-web) plus in-progress chrome work (chat input rework,
agent settings, codegen panel, variables modal, toolbar actions,
model discovery).
2026-06-09 23:27:39 +08:00
Kayshen-X bef43c74a9 fix(editor): polish rust ui interactions 2026-06-09 09:55:33 +08:00
Kayshen-X b1e67ba75f fix(editor-ui): polish rust chrome interactions 2026-06-09 09:38:37 +08:00
Kayshen-X 6a041c144c feat(editor-ui): single-row scrollable framework tabs in the Code panel 2026-06-09 09:38:36 +08:00
Kayshen-X 083417506b fix(editor-ui): make Design/Code property tab clickable 2026-06-09 09:38:35 +08:00
Kayshen-X 681dd76ad4 feat(host): code download + AI structure bundle export 2026-06-07 19:21:29 +08:00
Kayshen-X f1068c275d feat(host): dispatch Code panel actions 2026-06-07 19:21:24 +08:00
Kayshen-X ec553017b1 feat(editor-ui): add CodegenAction to PropertyPanelAction 2026-06-07 15:25:37 +08:00
Kayshen-X 43bb594065 fix(ci): isolate deep layer fixture stack 2026-06-06 14:16:13 +08:00
Kayshen-X 7a1e7531de fix(canvas): keep auto-layout children in flow 2026-06-06 12:16:12 +08:00
Kayshen-X a6e3eaab1f fix(editor): tighten default text bounds 2026-06-06 00:29:06 +08:00
Kayshen-X 54fb746881 feat(mcp): expand rust editor mcp surface 2026-06-05 22:19:08 +08:00
Kayshen-X 54ca298352 feat(editor): wire the TopBar fullscreen button
The Maximize icon (rightmost of the TopBar right cluster) was painted
but had no hit-test mapping, so clicking it did nothing.

- Add TopBarHit::ToggleFullscreen + a hit-test rect matching its paint
  position; add a regression test.
- Native: the host raises a pending_fullscreen_toggle intent (it can't
  reach the winit window); app_handler consumes it after the press and
  routes through the existing handle_menu_action(ToggleFullscreen) ->
  window.set_fullscreen(), the same path the macOS menu item used.
- Web: the WASM host toggles the browser Fullscreen API directly
  (document request_fullscreen / exit_fullscreen) — no runner round-trip
  and no unconsumed intent.
2026-06-02 23:25:11 +08:00
Kayshen-X e35d26fa71 fix(canvas): correct boolean-op geometry — smooth curves, holes, chaining
flatten_path (ContourMeasureIter) + compound even-odd SVG d so curves stay smooth and Subtract/Exclude holes render; build_node_path parses svg_path so chained ops round-trip. Native + web.
2026-06-02 22:14:02 +08:00
Kayshen-X fecdd395d0 fix(panels): layer context-menu Delete/Duplicate act on the whole selection
Right-press menu-open + Delete/Duplicate dispatch kept the multi-selection instead of collapsing to the right-clicked row (web + native). Adds a multi-delete core test.
2026-06-02 22:14:01 +08:00
Kayshen-X 3d3ba232c8 fix(editor): pass page_id on chat-design InsertSubtree (native + web)
Restore page_id: None on the two chat_design_apply InsertSubtree initializers (dropped by a branch reset).
2026-06-02 22:14:00 +08:00
Kayshen-X 82d481547c feat(panels): git-panel commit-detail diff, overflow menu, signature form
Bring the Rust git panel to TS parity across four surfaces:

- Commit rows expand inline into a semantic diff card (ported
  diffDocuments / indexNodesById / engineDiff over serde_json::Value)
  instead of navigating to a separate diff page; the card shows the
  "~modify N nodes" summary plus a per-node patch list. blob_at_commit
  reads the {rev} and {rev}^ blobs to compute base-vs-next.
- Overflow menu (...) with the 5 TS actions — switch tracked file, clear
  commit author, remote settings, SSH keys, close repository — backed by
  GitOverflowView subviews (tracked-file picker + SSH-keys list) and
  remote-settings rows (origin URL + ahead/behind + fetch; no HTTPS token
  field, matching TS).
- Commit signature form: empty commits are refused, and committing with no
  configured author opens an inline name/email form (Enter saves, Escape
  cancels) that writes the repo-local identity before retrying the commit.
- Polish: taller commit-detail card, removed panel shadow, lengthened the
  ready panel, and unified the commit-textarea caret blink to the app's
  500 ms cadence.

New overflow/SSH/author/remote labels resolve via Document::t with an
English fallback for keys not yet in the locale tables.
2026-06-02 09:42:03 +08:00
Fini b846a2929e fix(ai): apply rust chat design blocks 2026-06-01 22:07:17 +08:00
Fini 26e812dba1 fix(settings): track image generation test status 2026-06-01 06:59:07 +08:00
Fini 0c61ba5b8e fix(settings): track image search test status 2026-06-01 06:27:36 +08:00
Fini 3d1c0b6ae1 fix(settings): open image provider menu 2026-06-01 06:10:37 +08:00
Fini 68e7530417 fix(settings): copy pretty mcp client config 2026-06-01 05:34:16 +08:00
Fini b9d5639a3e fix(ai): disable chat input while streaming 2026-06-01 05:24:44 +08:00
Fini 8a074595d7 fix(settings): add mcp config copy action 2026-06-01 02:25:43 +08:00
Fini 6fc604a184 fix(ai): add chat panel resize handles 2026-06-01 02:03:38 +08:00
Fini 0113cccbcf fix(ai): reveal design json copy on hover 2026-06-01 00:46:41 +08:00
Fini 1be8b4ac80 fix(ai): copy design json cards 2026-06-01 00:19:29 +08:00
Fini 5161da5008 fix(ai): expand design json cards 2026-06-01 00:03:25 +08:00
Fini 504ba56eb8 fix(ai): toggle tool call cards individually 2026-05-31 23:52:02 +08:00
Kayshen-X 6105134014 feat(panels): inline commit-detail card replacing full-takeover diff
Clicking a recent-commit row now toggles an inline 里程碑详情 detail card
under the row (TS HistoryMilestoneRow) instead of tearing the whole panel
into a full-screen commit diff. The card carries 恢复 (restore the tracked
doc to that commit) + 复制哈希 (copy the hash to the clipboard) buttons.

Cross-layer:
- op-editor-core: GitPanelState.expanded_commit + GitPanelAction::{RestoreCommit,CopyHash}
- op-editor-ui: GitPanelHit::{RestoreCommit,CopyCommitHash}; paint inserts the
  card between rows and pushes later rows + panel height down by CARD_H, with
  expand_offset_before/expanded_card_extra/ready_commit_card_buttons keeping
  paint and hit-test in lockstep (proven by a new geometry test).
- op-host-native: row click toggles expanded_commit; card buttons emit actions
- op-host-desktop: RestoreCommit runs repo.restore via run_reloading_git_op;
  CopyHash writes the OS clipboard; the card collapses when the log changes

Deferred (Phase 2): autosave kind/grouping, the semantic inline diff summary.
2026-05-31 23:51:22 +08:00
Fini 048a786fa5 fix(agent): keep pure provider base urls read-only 2026-05-31 22:30:29 +08:00
Kayshen-X e323ee49ab fix(git): scope Enter swallow to a visible ready Git popover
The Enter guard keyed off branch_picker_open/overflow_open alone, so a
stale flag while the panel was closed / loading / merging / showing a diff
would wrongly eat the global Enter. Add git_ready_popover_open() (panel
open + ready view + a popover flag) and guard on it instead.
2026-05-31 22:04:17 +08:00
Kayshen-X 20a6327546 fix(git): blink the create-branch input caret
The inline 新建分支 name input painted a static '|' and the host never woke
the loop for branch_create_focused, so the caret sat frozen. Blink it on the
shared commit-caret cadence (paint_menu_input), wake next_animation_deadline
for branch_create_focused, and seed/reset commit_caret_anchor_ms on focus +
keypress so it starts solid then blinks.
2026-05-31 22:03:59 +08:00
Kayshen-X 609e7910fa fix(git): swallow Enter while branch-picker / overflow popover is open
In list / merge mode (and the overflow menu) no input is focused, so Enter
skipped every input handler and fell through to the global chat send. Guard
it: while either ready-state popover is open, Enter is consumed (focused
inputs still submit via the handlers above).
2026-05-31 22:00:43 +08:00
Kayshen-X 86168ce866 fix(git): suspend commit/remote/https inputs while branch picker is open
A stale commit/remote/https focus could still route text + Enter to the
hidden input while the branch-picker dropdown was open (firing a hidden
commit / set-remote / login). Gate the three focus helpers on
!branch_picker_open so those inputs are inactive whenever the dropdown is
showing; focus resumes when it closes.
2026-05-31 22:00:42 +08:00
Fini 2bae44417e fix(agent): parse ACP args like web settings 2026-05-31 21:48:50 +08:00
Kayshen-X ccf0278ee5 fix(git): give branch-picker sub-mode Escape priority over input focus
A stale focused Git input (commit / remote / https) could intercept the
merge-mode Escape, because the sub-mode handler ran after the input
defocus handlers. Move the sub-mode Escape ahead of them so create/merge
always exits to the branch list on the first Escape.
2026-05-31 21:05:30 +08:00
Kayshen-X 83fd78f293 fix(editor): complete boolean toolbar ops 2026-05-31 21:05:28 +08:00
Kayshen-X 1a2e97c2bd fix(mcp): make live server startup usable 2026-05-31 21:05:27 +08:00
Kayshen-X 1ef8c45f37 fix(git): wire branch-picker merge-mode cancel + Escape
Merge mode had no exit: Escape was gated on branch_create_focused (false
in merge mode) and the painted 取消 hint was inert. Now:

- Escape is mode-based (branch_picker_open && mode != List → List), so it
  steps both create AND merge sub-modes back to the branch list
- new GitPanelHit::BranchPickerCancel: in merge mode a click anywhere but a
  branch row (incl. the 取消 hint) returns to the list
2026-05-31 21:05:25 +08:00
Kayshen-X c81c36da8e feat(git): wire branch-picker create + merge footer actions
The 新建分支 / 合并分支 footer buttons were visual-only; this makes them
functional (TS GitPanelBranchPicker list/create/merge state machine):

- GitBranchPickerMode { List, Create, Merge } drives the dropdown body
- 新建分支 → inline name input (paint_menu_input) + Create button; typing
  routes to branch_create_draft, Enter/Submit runs CreateBranch
  (create_and_switch_branch); Escape returns to the list
- 合并分支 → merge mode listing non-current branches; a row merges it
- paint↔hit-test lockstep via shared branch_footer_rects / branch_create_rects
  + a backend-free label_px width heuristic
- input_active() now counts the branch-create field so shortcuts don't leak

All labels resolve through op-i18n (createAction/mergeAction/createPlaceholder
/createSubmit/cancel — present in all 15 locales).
2026-05-31 21:05:24 +08:00
Fini c80491b4ed fix(ai): show image profile test action 2026-05-31 20:43:51 +08:00
Kayshen-X e763bff0f0 Improve git panel parity and macOS bundle identity 2026-05-31 20:23:28 +08:00