Hint panel omits the optional count argument after seed <table>
#26
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found in manual testing.
Entering
seed <table>(trailing space) shows the continuationcandidates
setand--seedin the hint panel, but never mentionsthe optional
countargument at all — even thoughcountis themost common thing a user types next (
seed users 50).Root cause
seed <table>is already a complete command (the count isoptional), so the ambient-hint ladder surfaces continuation
candidates (
set,--seed). The count is a bare positionalnumber with no keyword/fixed token, so it produces no Tab
candidate and is therefore invisible.
An
IntroProseHintMode (as used for the CREATE TABLE element slot)does not work here: that mechanism only surfaces for an
incomplete required slot. For a complete command's optional
continuation, the outer
Seq's successful match clearspending_hint_modebefore it can be shown (verified during the seedPhase 2 work; the attempt was reverted).
What's needed
A general way to advertise optional positional non-keyword
arguments (a bare number / path) in the hint panel alongside keyword
candidates. Options to weigh:
in addition to the candidate ladder, when an expected node is a
bare
NumberLit/BarePathwith no candidate text.<count>) — but that muddiesthe "candidates are insertable tokens" contract.
Smallest visible scope:
seed <table>should mention a row count(default 20). Broader value: any command with an optional positional
number (none today besides seed, but the pattern will recur).
Severity: minor UX polish —
countis documented inhelp seedandseed <table> <n>works.Fixed in
ee3ccd8.At
seed <table> ▮the hint panel now shows a prose line advertising the optional row count (and the other options), instead of only theset/--seedchips:Tab still cycles
set/--seed(completion is independent of the hint render).Mechanism (the prior attempt was reverted because
pending_hint_modeis cleared by the trailing optionals): the existingIntroProseHintMode(ADR-0024 §HintMode-per-node, issue #4's CREATE-TABLE element hint) is the right tool — it shows prose that introduces a candidate-less position with the keyword alternatives folded in. To make it reach this position,walk_optionalnow stashes a skipped inner'sIntroProsekey into a newWalkContext.surviving_intro_hint(key + position) before the empty match clearspending_hint_mode. A position guard keeps it only when the skip position is the cursor, so it never leaks past a later-consumedset …clause, nor once the count is supplied. The resolver returns it ahead of the empty-expected short-circuit. The seed count is wrappedHinted{IntroProse("hint.seed_count")}.Scope (per the question on this issue): the prose mentions both the count and the
seed <table>.<column>column-fill form. OnlyIntroProseis carried —ProseOnly/ForceProseand the CREATE-TABLE element (a requiredRepeated, unaffected) keep their existing paths. NoAmbientHint/renderer change.Behaviour (all tested):
seed users ▮→ count prose ✓ (both simple and advanced mode)seed users 50 ▮→set/--seedchips (count given, no hint) ✓seed users set email='x' ▮→ no count leak past the clause ✓seed users.email ▮→ count prose (count valid after column-fill) ✓Decision recorded in ADR-0022 Amendment 7. +3 tests; full suite green (2436 pass, 1 ignored).