Files
orca/src/shared
13f062d093 feat: hide markdown front matter by default with per-file toggle (#4468) (#4636)
* feat: hide markdown front matter by default with per-file toggle (#4468)

Front matter in the markdown preview was always visible above the
rendered body, which clutters reading for files where the metadata
is incidental. Default the card to hidden and let users opt in per
file via a small switch in the section header.

* Add a per-file markdownFrontmatterVisible flag in EditorSlice,
  mirroring the editorViewMode pattern (absent entry = hidden;
  storing only explicit true values keeps the record minimal).
* Clean the entry up on closeFile, preview-tab replacement, and
  worktree removal; reset on runtime switch.
* Render the existing front-matter card unchanged when the toggle
  is on, hide only the <pre> body when it is off, and keep the
  section header + SettingsSwitch visible so the affordance stays
  discoverable.
* Add 4 regression cases in editor.test.ts mirroring the
  editorViewMode tests.

* fix: persist markdown front matter visibility

Co-authored-by: Orca <help@stably.ai>

---------

Co-authored-by: Jinwoo-H <jinwoo0825@gmail.com>
Co-authored-by: Orca <help@stably.ai>
2026-06-04 16:02:06 -04:00
..
2026-05-30 02:46:28 -07:00
2026-05-30 11:05:58 -07:00
2026-05-30 11:05:58 -07:00
2026-05-31 05:55:04 -07:00
2026-05-26 14:53:16 -07:00
2026-05-30 11:05:58 -07:00