You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Console UX nit: when the user types a prefix that doesn't exact-match a registered command/cvar, the console currently rejects it. The user has to type a longer prefix, hit Tab to autocomplete, then add the args. Friction adds up when 200+ cvars exist.
Goal
Intelligent partial-match resolution at command parse time: if the typed token isn't exact-match, find the BEST prefix match (longest common prefix that's unambiguous) and run that command transparently, with a clear log line showing what we picked.
Then dispatch the canonical name with the remaining arg tokens unchanged.
If ambiguous_matches.size() > 1, print the error path (current behavior + list of candidates capped at ~8 with ... (N more) suffix).
Cvar (optional UX)
r_console_smart_resolve (CVAR_ARCHIVE, default 1): toggle the feature for users who prefer strict matching. Off = current behavior. On = the new auto-resolve.
Acceptance criteria
deno metalfx resolves to r_denoiser metalfx with one log line.
p (ambiguous) errors with the candidate list.
r_denoiser (exact match) dispatches with no resolution log line.
All existing exact-match commands keep working identically.
Levenshtein / fuzzy-match across typos (r_denosier -> r_denoiser). Prefix-only for now; fuzzy is a separate issue.
Multi-word command resolution (we don't have multi-word commands today).
Cross-link
Fits naturally in the same PR as issue #161 (cvar UX: per-value platform gating + dep warnings) since both touch the cvar/command parse path. Bundling them lands the full console UX upgrade as one review unit.
Context
Console UX nit: when the user types a prefix that doesn't exact-match a registered command/cvar, the console currently rejects it. The user has to type a longer prefix, hit Tab to autocomplete, then add the args. Friction adds up when 200+ cvars exist.
Goal
Intelligent partial-match resolution at command parse time: if the typed token isn't exact-match, find the BEST prefix match (longest common prefix that's unambiguous) and run that command transparently, with a clear log line showing what we picked.
Examples
When NOT to auto-resolve
If multiple candidates are equally close (no unambiguous winner), fall back to current behavior (error + suggest):
Heuristics
Priority for tie-breaking:
Implementation sketch
Single function in
src/console/Console.cpp:Called from
Console::Execute()before the dispatch. Ifcanonical_nameis non-empty AND!is_exact_match, print one info-level log line:Then dispatch the canonical name with the remaining arg tokens unchanged.
If
ambiguous_matches.size() > 1, print the error path (current behavior + list of candidates capped at ~8 with... (N more)suffix).Cvar (optional UX)
r_console_smart_resolve(CVAR_ARCHIVE, default 1): toggle the feature for users who prefer strict matching. Off = current behavior. On = the new auto-resolve.Acceptance criteria
deno metalfxresolves tor_denoiser metalfxwith one log line.p(ambiguous) errors with the candidate list.r_denoiser(exact match) dispatches with no resolution log line.tests/cvar_ux_test.cppextending PR feat(console): platform-filter cvar listing + accept "0" as off alias #159's coverage with 3-4 cases (exact match, unique-prefix match, ambiguous, no-match).Out of scope
r_denosier->r_denoiser). Prefix-only for now; fuzzy is a separate issue.Cross-link
Fits naturally in the same PR as issue #161 (cvar UX: per-value platform gating + dep warnings) since both touch the cvar/command parse path. Bundling them lands the full console UX upgrade as one review unit.