Skip to content

Improve file documents, Markdown editing, and terminal file drops - #39

Merged
yansfil merged 16 commits into
mainfrom
feat/file-markdown-image-terminal
Sep 10, 2026
Merged

yansfil merged 16 commits into
mainfrom
feat/file-markdown-image-terminal

Conversation

@yansfil

@yansfil yansfil commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

What changed, in one paragraph a new contributor can follow

Improve the central file document surface with a shared toolbar for context, find, wrap and reveal actions, and a Markdown-only Preview/Edit control.
Markdown opens in Preview, renders the current draft in a constrained native document view, and remembers the mode per open tab.
Editor fixes preserve typed text and autosave identity across snapshot updates and tab switches, and keep syntax highlighting from repeatedly changing font size.
Terminal links require Command+Click.
Dropping local files inserts their quoted paths into the receiving prompt immediately, in order and without Enter; attachment recognition, editing and submission remain provider-owned.
There is no separate image shelf or synchronized attachment-removal claim.

Review boundary

  • Runtime mutex: adds only an in-memory lookup and update of per-file-tab view flags; identical selections publish no change, with no new I/O or subprocess work under the lock.
  • Snapshot wire: adds markdown_preview and wrap to editor tabs in revisioned rest; these are ephemeral tab choices, reset by close/reopen or restart, rather than persisted application settings.
  • Ownership: the core owns tab mode/wrap and existing focus state; the shell renders the draft, performs native document layout and sends file-drop bytes through the existing terminal writer. Herdr retains topology and PTY ownership.
  • Herdr contract: no new Herdr methods, fields or parameters, and no provider transcript parsing or provider patches.
  • Failure path: existing read-only/conflict/save notices remain visible in both document modes; preview parse/link failures show a reason, invalid drop paths raise a native error, and unsupported image recognition remains visible in the provider composer. No attachment-success status is inferred from PTY delivery.

Evidence

  • Verified by: full Swift suite, 373 tests; Rust suite, 433 passed and 6 ignored; FFI suite, 31 passed; 13 repository/design gates plus the staged design gate; clean-HEAD application build and deep/strict signature verification.
  • Real AppKit regressions cover typed/autosaved contents, delayed-save tab identity, final-line layout, ruler clearance, requested font size through asynchronous highlighting, and Korean/English wrapping. The font regression reproduced the original 12pt-to-Courier-14pt change before the fix.
  • File-drop tests observe the actual terminal output boundary: ordered framed paths, preserved preceding/subsequent text, focus, no automatic Enter, special-character escaping and hidden/detached rejection. The same two-file payload produced native image indicators without Enter in private fixtures running versions 0.153.4 and 2.1.265 of the supported terminal coding clients. This final fixture run did not submit or claim new model image-access proof.
  • The maintainer reviewed the installed final build, confirmed the requested fixes worked, and requested this PR. Operator servers were preserved during installation.
  • Not verified (and why): exhaustive native modifier/Option-drag combinations, all narrow-window/error-state visual cases and matched idle/driven latency measurements were not rerun on the final build; desktop automation was disabled at the maintainer's request. No latency improvement claim is made. Final provider fixture evidence establishes composer indicators, not attachment lifecycle synchronization.
  • High-frequency path impact: link handling reuses the existing modifier-gated policy without new pointer state or consumer publication. Drop performs O(total path characters) quoting once and sends one ordered payload, with no image reads, copies, persistent attachment state or viewport observers. Editor highlighting is rescheduled only on actual language/font changes. Existing queue ownership and bounds remain unchanged.
  • Human review focus: document toolbar/accessibility and narrow-width layout; dirty/conflict behavior across Preview/Edit and tab changes; ordinary terminal selection versus Command+Click; immediate drop insertion with existing prompt text and subsequent normal Enter.

Screenshots

The maintainer reviewed the installed native application directly and accepted the final fixes.
A shareable screenshot of the final build is not attached; local run artifacts remain excluded from Git, and earlier screenshots do not represent the final font/drop revision.
This remains a documentation gap rather than an automated visual-verification claim.

AI tooling

Implementation and regression tests used coding assistance.
The maintainer performed the final native interaction review; automated checks and explicitly unverified boundaries are listed above.

@yansfil
yansfil force-pushed the feat/file-markdown-image-terminal branch from 0a591d8 to a10a3c0 Compare September 10, 2026 01:19
@yansfil
yansfil merged commit e04e47e into main Sep 10, 2026
5 checks passed
@yansfil
yansfil deleted the feat/file-markdown-image-terminal branch September 10, 2026 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant