โ– humdrum codex / glint v1.0.2
license AGPL-3.0

โ† issues

TASK-019 Open directly in preview / reading mode (-p, --preview)

๐Ÿ Done feature priority: medium release-1

created 2026-06-29 16:56 ยท updated 2026-06-30 05:11

Description

Open a document straight into the Glamour read view, skipping the editor โ€” turns glint into a glow-style markdown reader. Flag forms (matching the command convention): -p / --p / -preview / --preview, optionally with a file: 'glint -p notes.md' opens notes.md in preview; 'glint -p' could preview the picker selection or the current dir's pick. Implementation: main parses the preview flag and the app starts in ModePreview with the file loaded + rendered (a.Start variant that loads then togglePreview). Ctrl+P still toggles back to the editor; Esc/Ctrl+Q behave normally. Consider other reading-mode entry points later: a key in the picker to preview-without-editing, and a 'glint -p' over a directory/vault. Positioning: this lets glint replace glow as the terminal markdown reader.

Acceptance Criteria

Implementation Notes

main.go -p/--preview flag โ†’ App.StartPreview(path): Load then togglePreview (ModePreview); no file falls back to picker. setSize re-renders preview at new width. README usage + help COMMANDS document -p. 3 app tests, all green.