Commit Graph

55 Commits

Author SHA1 Message Date
Julien Calixte
fbfbbdc0be test(completion): cover bracket-header block separation
Some checks failed
Deploy to GitHub Pages / build (push) Failing after 1m7s
Deploy to GitHub Pages / deploy (push) Has been skipped
2026-07-10 14:30:30 +01:00
Julien Calixte
b17de475ff fix(completion): separate a new block from the one above on accept
Accepting a bracketed [[…]] header typed directly under a block welded
the two together. When no blank line sits above, the insert now carries
a leading newline (never at the top of the document).
2026-07-10 14:30:30 +01:00
Julien Calixte
f7e856b082 test(editor): cover Enter-accepts and Escape newline semantics 2026-07-10 14:30:24 +01:00
Julien Calixte
8c14ae9c42 feat(editor): always accept completions on Enter
Enter now accepts the highlighted item like Tab whenever the popup is
open; dismiss with Escape first to insert a plain newline. Drops the
`engaged` gate that only accepted after navigating the menu.
2026-07-10 14:30:24 +01:00
Julien Calixte
f535c9ede5 feat(grid): widen the feature name column so longer names show 2026-07-10 14:30:13 +01:00
Julien Calixte
83f04af8d7 test(format): cover version, uniqueness, and example conformance 2026-07-02 22:04:20 +02:00
Julien Calixte
53716a13ea feat(format): read and emit macroplan_version, require unique names
Reject a macroplan_version newer than this build understands rather than
silently mis-rendering it. Feature names are the join key for a
milestone's requires, so duplicates (previously resolved to the first
match) are now a parse error. The sample plan emits the version marker.
2026-07-02 22:04:15 +02:00
Julien Calixte
e380e6d336 test(completion): cover popup viewport fitting geometry
Some checks failed
Deploy to GitHub Pages / build (push) Failing after 24s
Deploy to GitHub Pages / deploy (push) Has been skipped
2026-07-02 21:45:41 +02:00
Julien Calixte
9ee7c05019 fix(completion): keep the popup inside the window near screen edges
Anchoring the popup below the caret let it spill off the right/bottom of
the window when the caret sat at the edge, so the browser clipped it.
After render, measure the popup and shift it left off the right edge or
flip it above the caret line when there's no room below.
2026-07-02 21:45:35 +02:00
Julien Calixte
16b07844a8 test(editor): cover Tab/Enter completion accept semantics
Some checks failed
Deploy to GitHub Pages / build (push) Failing after 44s
Deploy to GitHub Pages / deploy (push) Has been skipped
Mounts PlanEditor under happy-dom and drives the popup: Tab accepts an
untouched menu, Enter closes it without accepting, and Enter accepts once
the selection has been navigated.
2026-07-02 09:39:37 +02:00
Julien Calixte
96c3f489a3 feat(editor): accept completions on Enter only after navigating
Enter kept hijacking the auto-opened popup mid-typing. Now Tab always
accepts, while Enter accepts only once the author has moved the selection
(arrow / Ctrl-N/P); an untouched popup lets Enter insert a newline.
2026-07-02 09:37:02 +02:00
Julien Calixte
449be7766e fix(completion): gate block headers behind a blank line
The popup offered [[feature]]/[[milestone]] on every fresh line — right
under the last property or straight after a header. Only volunteer them
once there's a blank line above (the "two new lines" convention); typing
a bare `[` still summons them anywhere. Property keys are unchanged.
2026-07-02 09:36:53 +02:00
Julien Calixte
122147c19c refactor(grid): label the name column header instead of repeating the title
Some checks failed
Deploy to GitHub Pages / build (push) Failing after 22s
Deploy to GitHub Pages / deploy (push) Has been skipped
The corner header rendered plan.title in the 9rem name column, so it
collapsed to "..." — and the title already shows in the switcher, the
source, and the heading above the grid. Label its own column instead.
2026-06-19 19:03:56 +02:00
Julien Calixte
b6f7bcab82 fix(editor): pin line-height to integer px so the caret stays aligned
Some checks failed
Deploy to GitHub Pages / build (push) Failing after 23s
Deploy to GitHub Pages / deploy (push) Has been skipped
A fractional line box (0.8rem × 1.6) is rounded differently by the
textarea than by the <pre> backdrop, so the caret drifted further from
its glyph the lower it sat — worst at the bottom of a tall file.
2026-06-19 18:55:42 +02:00
Julien Calixte
be86b82823 fix(completion): stop offering status once its quote is closed
Some checks failed
Deploy to GitHub Pages / build (push) Failing after 23s
Deploy to GitHub Pages / deploy (push) Has been skipped
The pattern's trailing optional quote let a complete `status = "x"`
match, so the popup reopened after the closing quote. Drop it so the
match ends with the value, while still typing remains supported.
2026-06-19 18:54:37 +02:00
Julien Calixte
e726675d77 fix(editor): don't open the completion popup on deletion
Backspace/delete/cut emit an input event too, which reopened the
popup mid-edit. Skip the refresh on any delete inputType.
2026-06-19 18:53:55 +02:00
Julien Calixte
5a4fbb452d fix(editor): close completion popup after accepting a value
Accepting an enum value (e.g. "on-track") re-ran the chained refresh,
which re-matched the value and reopened the popup. Chain only after
completing a key, when there are still values to offer.
2026-06-19 18:53:44 +02:00
Julien Calixte
d26ebeef71 fix(completion): use local date for the "today" suggestion
Some checks failed
Deploy to GitHub Pages / build (push) Failing after 22s
Deploy to GitHub Pages / deploy (push) Has been skipped
Slicing the UTC ISO string showed the wrong calendar day near
midnight for non-UTC authors. Build it from local getFullYear/
getMonth/getDate so it matches the day the author actually sees.
2026-06-19 18:45:58 +02:00
Julien Calixte
e42987a070 feat(completion): suggest dates in date value positions
Some checks failed
Deploy to GitHub Pages / build (push) Failing after 22s
Deploy to GitHub Pages / deploy (push) Has been skipped
The TOML editor offered nothing when typing a date, leaving the
yyyy-mm-dd format undiscoverable until a parse error. Suggest today
(a full, easy-to-edit date) and the current-year prefix on empty
date values and fresh reestimates elements, backing off once a date
is being typed.
2026-06-19 18:43:41 +02:00
Julien Calixte
65726a0211 refactor(layout): rename view-only mode to "macroplan"
Avoids the redundant ?view=view in favour of the explicit ?view=macroplan,
matching the button label.
2026-06-19 17:48:30 +02:00
Julien Calixte
f42cb2b779 feat(layout): toggle between source, macroplan, and split panes
The chosen layout is kept in the URL (?view=) so it's shareable and
bookmarkable rather than persisted. PNG export is disabled in
source-only mode since the rendered node it captures isn't mounted then.
2026-06-19 17:42:38 +02:00
Julien Calixte
120a329421 chore: format 2026-06-19 17:30:34 +02:00
Julien Calixte
abce8b65cd style(editor): widen completion popup to avoid horizontal scroll 2026-06-19 10:39:55 +02:00
Julien Calixte
3d7175006e feat(editor): navigate completions with Ctrl+N/Ctrl+P 2026-06-19 10:39:49 +02:00
Julien Calixte
4a8395abb6 feat(editor): show a completion popup as you type
Anchor a suggestion list at the caret (monospace metrics, re-anchored on
scroll), with arrow/Enter/Tab/Esc handling and click-to-accept. Accepting
a key like `status` chains straight into its value suggestions.
2026-06-18 18:35:30 +02:00
Julien Calixte
7245211b62 feat(editor): add schema-aware TOML completion logic
Given a source and caret offset, suggest block headers, the keys valid
for the current block (excluding ones already written), status enum
values, and the feature names referenced by a milestone's requires.
Mirrors the schema in parse.ts.
2026-06-18 18:35:25 +02:00
Julien Calixte
40ee9f509c refactor(model): name Feature status by domain, not RAG color
StatusLevel held green/orange/red — the RAG vocabulary CONTEXT.md
explicitly lists under _Avoid_ for the Status term, leaking a
presentation concern into the model and authored TOML. Replace with
on-track/at-risk/off-track; color now lives only in the renderer's
tone() mapping. Breaking change to authored .toml status values.
2026-06-18 18:13:53 +02:00
Julien Calixte
64efc91392 feat: add valibot 2026-06-17 10:20:40 +02:00
Julien Calixte
362a448848 docs(model): clarify the switchTo last-good reset comment 2026-06-17 09:58:03 +02:00
Julien Calixte
e2f76195dd fix(ui): disable the delete button during PNG export 2026-06-17 09:58:03 +02:00
Julien Calixte
ba5442c58f test(app): cover the switcher, delete-confirm and .toml download wiring 2026-06-17 09:51:20 +02:00
Julien Calixte
7468ebd3c9 feat(ui): wire the plan switcher, delete confirm and .toml download into the app 2026-06-17 09:46:56 +02:00
Julien Calixte
3a012f186d feat(model): make useMacroplan own a library of named plans 2026-06-17 09:40:40 +02:00
Julien Calixte
1c986e417f feat(ui): add the plan switcher dropdown 2026-06-17 09:35:32 +02:00
Julien Calixte
3c32542a76 feat(export): add .toml source download and shared slugify helper 2026-06-17 09:32:07 +02:00
Julien Calixte
d499433f93 test(model): cover the authored plan span
Add coverage for start/end extending, snapping, never-clipping, and the
empty-plan case. The bundled sample now demonstrates the keys, so its
expected week range moves to the authored bounds.
2026-06-17 01:40:34 +02:00
Julien Calixte
d95f0a78c7 feat(model): add optional start/end plan span
Optional top-level `start`/`end` dates widen the plan's week range with
lead-in / trailing columns. They only extend the auto-fitted range, never
narrowing it or clipping a Feature, so a momentarily-tight bound can't hide
work in progress.
2026-06-17 01:40:29 +02:00
Julien Calixte
f37122eea1 test(export): cover the export filename slug 2026-06-17 01:30:07 +02:00
Julien Calixte
2173683535 feat(export): one-click PNG copy and download of the plan
Captures the full timeline (not just the scrolled viewport) by expanding
the grid to content width during render; clipboard write stays inside the
user gesture so Safari accepts it, with download as the documented fallback.
2026-06-17 01:30:03 +02:00
Julien Calixte
ead0d3158a test(model): expect three milestones in the bundled sample 2026-06-17 01:18:34 +02:00
Julien Calixte
80003077d3 docs(sample): add Code freeze and Beta launch milestones 2026-06-17 01:18:34 +02:00
Julien Calixte
ab28e2541a fix(editor): stretch the source textarea to fill its pane 2026-06-17 01:18:34 +02:00
Julien Calixte
8024f950e1 feat(grid): stack milestone labels in a band above the axis
- milestones render as horizontal label flags, auto-stacked onto extra
  rows with leader lines so labels in nearby weeks never collide
- "today" becomes a neutral grey column (mixed in oklab) and milestone
  diamonds are grey too — red is reserved for problems (late, red status,
  unmet counts), which no longer get a stray warm tint
- fix the name column to a stable width so the band aligns with the grid
2026-06-17 01:18:34 +02:00
Julien Calixte
629fa87ec1 style(layout): give the macroplan grid more width 2026-06-17 01:01:35 +02:00
Julien Calixte
6e800008d9 docs(sample): drop "slip" wording from the sample plan 2026-06-17 01:01:35 +02:00
Julien Calixte
d8ce9a052c feat(grid): stop bars at the last symbol and shade today's column
- bar line begins/ends at a glyph centre — no stub past the first/last symbol
- glyph halos so the bar passes behind, not through, the symbols
- today's week is a shaded column instead of a vertical rule
- widen week columns so date labels stop colliding
- drop "slip" wording from the legend
2026-06-17 01:01:35 +02:00
Julien Calixte
7cd6a1f98e feat(editor): syntax-highlight the TOML source with Shiki 2026-06-17 01:01:35 +02:00
Julien Calixte
e51f3b96e7 test(model): cover bar extent relative to the now week 2026-06-17 01:01:35 +02:00
Julien Calixte
7470d41803 feat(model): keep an overdue feature's bar running to the now week 2026-06-17 01:01:35 +02:00
Julien Calixte
1535c829ca test(ui): cover grid rendering of the sample plan 2026-06-17 00:38:16 +02:00