Commit graph

11 commits

Author SHA1 Message Date
Kayshen-X 9a4dd34bf4 fix(ci): address rust check failures 2026-06-19 03:03:33 +08:00
Kayshen-X 811b02d155 feat(config): add shared OpenPencil config store 2026-06-14 10:17:22 +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
Kayshen-X fa2f200d9a feat(panels): taller commit-detail card with initial-commit diff line
The expanded 里程碑详情 card was title+buttons only (60px) and showed no
diff context. Match TS image: grow it to 84px and add the diff status line
between title and buttons. The root commit shows '初始提交 — 没有父提交可对比'
(git.history.diff.initialCommit); later commits leave it blank until the
semantic node-diff summary lands.

- op-git: Commit.is_initial (parent_count == 0)
- op-editor-core: GitCommitSummary.is_initial
- op-host-desktop: plumb is_initial into the snapshot
- op-editor-ui: CARD_H 60→84, button row drops to +52, conditional diff line
2026-06-02 09:35:35 +08:00
Kayshen-X d0ae18f920 fix(git): normalize staged document paths 2026-05-31 17:43:36 +08:00
Kayshen-X 5974b2f55e fix(git): migrate repo operations to libgit2 2026-05-31 17:04:56 +08:00
Fini 1fa2d9415a Merge branch 's3a-orchestrator' into v0.8.0-new 2026-05-23 01:27:30 +08:00
Fini b1c3136deb feat(editor): EditorCommand::InsertSubtree — nested PenNode subtree insert
Existing EditorCommand variants are leaf-only (BatchInsertItem carries
only kind/name/x/y/w/h/fill_hex). The design orchestrator (S3a) must
apply rich nested designs — frames with children, layout, text — so
add InsertSubtree { nodes: Vec<PenNode>, parent_id }.

cmd_insert_subtree validates the parent is a container (or NONE = page
root), remaps every incoming node id to a fresh editor id via
remap_subtree_ids (so an externally-authored subtree can't collide
with live ids), and appends under the parent. The apply arm wraps it
in a history snapshot so the insert is one undo step.

NOT verified locally: op-editor-core does not currently build —
vendor/jian is pinned to unpushed commit 80121906 whose DesignMd*
types op-editor-core depends on are absent from every available jian.
The 8 InsertSubtree tests in command_subtree_tests.rs run once the
jian build is restored.

S3a Plan A.
2026-05-22 22:56:10 +08:00
Kayshen-X 2aacde0ce2 style: apply rustfmt to the workspace
cargo fmt --all -- --check was failing on CI after the recent
feature work landed unformatted (insert_<comp> MCP tools,
Component-Browser panel, Design-MD panel, op-i18n locale tables,
op-opmerge). Running cargo fmt --all touches 48 files; no behaviour
change.
2026-05-21 22:03:43 +08:00
Kayshen-X 6e012049e4 feat(editor): add Design-MD panel and complete i18n coverage
Design-MD panel — closes the last TS-vs-Rust parity gap:
- New floating op-editor-ui design_md_panel + design_md_markdown
  renderer: collapsible theme/colour/typography/component/layout/
  notes sections, colour swatches, inline markdown highlighting.
- op-editor-core: parse_design_md parser + panel UI state.
- Host: View-menu toggle, top-most paint + hit-test, drag,
  .md import/export; bumps the vendor/jian DesignMdSpec pointer.

i18n coverage:
- Git panel, merge/conflict/error dialogs and GitError messages
  routed through op-i18n; git locale tables split into
  <base>_git.rs under the 800-line cap.
- Closed 10 app-wide hardcoded-string gaps (AI chat, Figma import,
  file menu, layer context menu, property-panel fill, update /
  file-picker / load-error dialogs, accesskit labels).
2026-05-19 22:29:22 +08:00
Kayshen-X 64a5934dcf feat(desktop): add op-git crate for in-app version control
Drives the user's installed `git` via std::process::Command — the
same approach as the TS app's git-sys backend — so no libgit2/git2 C
dependency enters the workspace.

Covers repo discovery / init, working-tree status, staging, commit,
branch list / create / switch, history + diff, remotes, SSH keys and
credential storage. Adds a worktree-isolated merge orchestrator: a
branch merge runs in a throwaway detached worktree so a conflicting
.op merge never writes conflict markers into the live document — a
clean merge is fast-forwarded back, a conflicting one is reported as
a file-granular ConflictBag with the live tree left pristine.
2026-05-18 21:45:00 +08:00