Commit graph

1277 commits

Author SHA1 Message Date
Fini 2bc8e5aa34 feat(settings): edit acp agent entries 2026-05-30 19:37:37 +08:00
Fini ce59557b4d test(ai): cover image search job polling 2026-05-30 19:24:27 +08:00
Fini ad51f266d0 fix(settings): show mcp client config 2026-05-30 19:12:27 +08:00
Fini 883f8035fb feat(settings): persist acp agent entries 2026-05-30 19:04:00 +08:00
Fini cd1ca1ac66 fix(settings): use tested ark coding preset 2026-05-30 18:47:50 +08:00
Fini b68e142864 fix(settings): correct deepseek provider preset 2026-05-30 16:09:24 +08:00
Fini 32aa54fa4d fix(settings): add image provider selector 2026-05-30 16:06:23 +08:00
Fini 889f2a8e3a fix(ai): restore maximized chat affordance 2026-05-30 15:55:13 +08:00
Fini 67ed9ae146 fix(ai): align builtin model picker chrome 2026-05-30 15:49:11 +08:00
Fini da198f6432 fix(panels): match hidden layer state color 2026-05-30 15:45:13 +08:00
Fini cbf0491c74 fix(ai): align chat panel surface 2026-05-30 15:34:22 +08:00
Kayshen-X 31312eaf08 fix(panels): paint the centered git popover above the align toolbar
The Git popover is hit-tested at press block 0.9 — ahead of the align
toolbar (line 554) — but was painted at §8.2, BELOW the align toolbar
(§8.4). That was moot while the panel floated top-left, but once it
centres under the Git button it overlaps the align toolbar: paint said
the align toolbar was on top, the hit-test said the popover was, so a
click on an align button over the popover went to the popover.

Move the popover paint to §8.7 — above the align toolbar / marquee /
property overlays, still below the shape / locale pickers and modals —
so the paint z-order matches the hit-test priority.
2026-05-30 13:57:54 +08:00
Kayshen-X 31e5060057 feat(panels): match git empty-state to the TS GitPanelEmptyState
Faithful port of apps/web's git-panel-empty-state.tsx:

- Per-card hover effect (TS hover:/group-hover:): the card lifts 1px and
  recolors to border-primary/40 + bg-accent/30, the icon box to
  bg-primary/10 + text-primary. Tracked via the new
  GitPanelState.empty_hovered_card (0=Init / 1=Open / 2=Clone), updated
  by update_git_panel_empty_hover on cursor-move.
- Disabled Init card (no saved .op): the TS opacity-50 look + a
  not-allowed cursor (new CursorHint::NotAllowed → winit NotAllowed),
  and the requireSavedFile hint shown only on hover (TS Tooltip
  side="bottom", bg-primary text-primary-foreground).
- Gradient clock badge (from-muted/60 to-muted/20 + ring-border/60) and
  the TS container spacing (pt-8 / gap-5 / pb-6).

Adds the alpha()/over() colour helpers (Tailwind /NN opacity + compositing)
and a placement test for the per-card hover + not-allowed cursor.
2026-05-30 13:39:54 +08:00
Kayshen-X 3717e4cfb8 feat(panels): center git popover with caret + full cursor suppression
- Float the git panel centered under the TopBar git button (TS popover
  parity) with an up-caret; git_panel_rect is the single placement source
  that paint, hit-test, cursor and outside-click all read.
- git_panel_outer_rect (body + caret bridge) backs hit-test / cursor /
  outside-click / diff-scroll so a click or hover on the caret is caught
  by the popover instead of falling through to the canvas.
- over_floating_overlay keeps the canvas Move/Crosshair cursor from
  bleeding through every floating overlay (git / status / chat / toolbar /
  align-toolbar / shape / locale / file-menu / context-menu + the centered
  panels).
- Onboarding empty state: Init / Open / Clone cards; Init is disabled until
  the doc has a saved path, with a hover-gated "save .op first" hint pill.
- Split oversized files for the 800-line cap: git_panel -> {empty, status};
  geometry -> overlay_rects; top_bar -> top_bar_paint.
- Resolve the stash-pop conflict against the upstream refactor (ai_chat_rect
  now lives in ai_chat_geometry) and clear clippy-1.94 drift in upstream
  files (unnecessary_map_or, too_many_arguments, match_like_matches_macro)
  so the workspace gate passes.
2026-05-30 13:19:19 +08:00
Fini b849766cc2 fix(ai): fill placeholder frames from image search 2026-05-30 07:26:13 +08:00
Fini 1f6dac0b9c fix(ai): prefill builtin provider presets 2026-05-30 07:12:18 +08:00
Fini fc0fdc1132 fix(ai): hide assistant tool xml 2026-05-30 07:02:39 +08:00
Fini 52f69fadc5 fix(ai): use full width assistant transcript 2026-05-30 06:58:49 +08:00
Fini bb7e59e6eb fix(ai): lift chat panel surface 2026-05-30 06:44:12 +08:00
Fini 52f13a6149 fix(ai): use openverse credentials for image search 2026-05-30 06:41:08 +08:00
Fini 04746248a7 fix(ai): edit openverse image search credentials 2026-05-30 06:37:17 +08:00
Fini 3e843e4afa fix(ai): search model groups by label 2026-05-30 06:26:38 +08:00
Fini 8b28d7e51f fix(ai): show chat step details 2026-05-30 06:21:34 +08:00
Fini 9498e8d37d fix(ai): edit image generation profiles 2026-05-30 06:17:14 +08:00
Fini 54aff64327 fix(ai): add image generation profile rows 2026-05-30 06:10:04 +08:00
Fini a7db763268 fix(ai): surface tool call metadata 2026-05-30 05:47:27 +08:00
Fini 22b3d89855 fix(ai): pin chat step checklist 2026-05-30 05:32:12 +08:00
Fini 32a4134336 fix(ai): parse chat step progress tags 2026-05-30 05:25:50 +08:00
Fini 0ecd2a6a0e fix(editor): fit blank frame on startup 2026-05-30 05:16:04 +08:00
Fini 46673b9d76 fix(ai): add system auto update toggle 2026-05-30 05:06:33 +08:00
Fini cf26ccfdbc fix(ai): disable mcp port while running 2026-05-30 03:30:35 +08:00
Fini a91645642d fix(ai): label builtin model groups 2026-05-30 03:26:28 +08:00
Fini 4249721d98 fix(renderer): defer desktop gl startup 2026-05-30 03:08:58 +08:00
Fini 1b97bdea45 fix(ai): enable desktop image search 2026-05-30 02:27:35 +08:00
Fini d7d80270e0 fix(ai): render design progress as steps 2026-05-30 02:19:22 +08:00
Fini 78b0388c9a fix(editor): compact settings sidebar 2026-05-30 02:13:16 +08:00
Fini 3cb62317d7 fix(ai): add searchable model picker 2026-05-30 01:10:37 +08:00
Fini dec0c94710 fix(ai): tighten empty chat cards 2026-05-30 00:56:28 +08:00
Fini c0dada1a59 fix(editor): align starter frame and layer hover 2026-05-30 00:49:10 +08:00
Fini 8d0e3b04ba feat(ai): add built-in providers and align chat ui 2026-05-30 00:21:34 +08:00
Kayshen-X 9a716f09fb feat(panels): wire git empty-state cards (init / open / clone)
The onboarding cards are now actionable:
- 新建/Init → `GitRepo::init` at the saved doc's directory, then
  rebind the session so the doc is tracked (disabled until saved);
- 打开/Open → native folder picker → `GitRepo::discover` + a new
  `GitSession::bind_repo` (tracks the doc when it's under the repo);
- 克隆/Clone → info dialog for now (needs the in-panel URL form — a
  follow-up).

Adds GitPanelHit::{EmptyInit,EmptyOpen,EmptyClone},
GitPanelAction::{InitRepo,OpenRepo,CloneRepo}, host press dispatch +
binary drain, `git_panel.has_saved_file` tracked on every rebind, and
a hit-test test. EN/ZH strings for the two new messages.
2026-05-29 23:09:22 +08:00
Kayshen-X b1d8ca03b0 feat(panels): rich git empty-state (TS parity), visual
Replace the bare "不是 Git 仓库。" text with the TS onboarding empty
state: a History clock glyph in a rounded box, the
"这份文件还没有版本历史" heading, three cards (新建/打开/克隆 with
FilePlus/FolderOpen/GitFork icons + descriptions), and the "Git is
optional" note — laid out centred in a 380×284 panel.

- new History/FilePlus/GitFork icons;
- `GitPanelState.has_saved_file` dims the Init card when the doc is
  unsaved (matching TS);
- `empty_state_rects` shared for the upcoming card hit-test.

Card actions (init/open/clone) wired in a follow-up.
2026-05-29 22:56:07 +08:00
Kayshen-X 1f77d3875c fix(panels): compile out the git button on web (no git backend)
The web/wasm build has no git backend and never paints GitPanel, so
the top-bar git button toggled an invisible panel (Codex stop-time
review). Gate the button's paint + hit-test on a `GIT_BUTTON_AVAILABLE`
const (`!cfg!(target_arch = "wasm32")`) so it only exists on desktop.
2026-05-29 22:23:37 +08:00
Kayshen-X 89b74604ba feat(panels): add git-panel button to the top bar
The top bar had no affordance to open the git panel (only a
keyboard/menu path). Add a TS-style git button just right of the file
name: a `GitBranch` glyph + the current branch name when in a repo.
Always shown (per request) — a click toggles the git panel, which
offers `init` when the doc isn't yet a repo.

- new `Icon::GitBranch` lucide glyph;
- `TopBar.git_branch` from `git_panel.branch`; `git_button_rect`
  (CJK-aware width estimate so it clears a CJK file name) shared by
  paint + hit-test; `TopBarHit::ToggleGitPanel`;
- native host mirrors `main.rs` toggle bookkeeping (per-frame refresh
  does the scan); web host toggles `git_panel.open`.
2026-05-29 22:12:38 +08:00
Kayshen-X 6ad9a6a674 fix(host): render Korean (Hangul) text in chrome
Hangul codepoints were routed to the shared CJK typeface, which is
resolved from a Han ideograph (a Chinese font with no Hangul glyphs),
so 한국어 painted as blank .notdef boxes in the locale picker while
Chinese/Japanese/Hindi/Thai/Vietnamese rendered fine. Add a dedicated
`is_hangul_codepoint` split + a cached `korean_typeface` (resolved from
'한' → Apple SD Gothic Neo / Noto Sans KR) and route Hangul there in
both typeface-resolution paths.
2026-05-29 21:40:37 +08:00
Kayshen-X d4e035d03f fix(panels): keep file-menu dropdown anchor in sync with the divider
The new sidebar↔file-menu divider shifted the folder button right, but
`TopBar::file_menu_rect` (the dropdown anchor) still used the pre-divider
x, so the file menu opened left of its button (Codex stop-time review).
Route the anchor through the divider span and have hit_test reuse
`file_menu_rect` so paint / hit-test / anchor can't drift again.
2026-05-29 21:23:46 +08:00
Kayshen-X 3eb70ba4ce style(panels): align top-bar glyphs + smaller icons + left dividers
Match the TS top bar and the user's refinement feedback:
- icons 16→14px, chevron 12→10px (top-bar-local consts; other widgets
  keep their own sizes) — a touch smaller / more refined;
- route every glyph through `glyph_top(center_y, size)` and center the
  agent chip's icon + 11px text on the shared center line (fixes the
  off-axis drift);
- add a divider between the sidebar toggle and the file-menu (user
  request) and unify all three dividers via `paint_divider`
  (1×14, border@60%, 4px gaps) — TS `w-px h-3.5 bg-border/60 mx-1`;
- keep paint + hit-test in sync for the new divider spans.
2026-05-29 21:16:48 +08:00
Kayshen-X 8e4515f0e0 feat(host): web parity for zoom-to-fit + rename caret
Mirror the native host on the web backend:
- ArrowLeft/Right move the inline-rename caret (`apply_rename_caret`)
  before falling through to node-nudge;
- StatusBar search icon frames the active page content
  (`status_bar_search_hit` + `zoom_to_fit`, reusing `canvas_region` +
  `LayoutScene::content_bounds` + `Viewport::fit_to`).

Type-checks on the host target; the wasm bundle build still needs EMSDK.
2026-05-29 21:00:14 +08:00
Kayshen-X 6af2ef853b style(panels): refine top-bar agent chip to match TS
- add a 1px×14px divider between the agent/MCP chip and the locale
  button (TS `w-px h-3.5 bg-border/60`) so the status chip reads as a
  separate group;
- chip text 12→11px in muted-foreground, status dot 8→6px in
  emerald-500 (#10b981) — matches the TS chip density/colour.

Note: the chip showing "Agents & MCP" vs "N agent · M MCP" is
connection state (0 connected agents/MCP → the set-up label), not a
layout bug.
2026-05-29 20:52:54 +08:00
Kayshen-X 88428ae72c fix(canvas): apply node opacity to raster images
Node-level opacity was folded into fill/stroke/gradient/shadow alpha at
scene-build, but rasters carry no colour to bake into, so image nodes
rendered fully opaque (codex stop-time review). Carry cumulative opacity
on `SceneNode` and modulate the image paint's alpha in the native draw
path (`draw_image_with_options` gains an `opacity` arg; trait default +
web fall back to opaque).
2026-05-29 20:46:23 +08:00