ui: surface diagnostics in the ambient hint panel (ADR-0027 §2)
ambient_hint now reads the walker's schema-aware diagnostics. input_diagnostics is non-empty only for a command that structurally parses — so a non-empty result means "complete and submittable, but wrong or dubious". That is checked early (right after the Tab-cycle memo), ahead of slot hints and completions: a command that parses but is flawed no longer gets the misleading "Submit with Enter" prose, it gets the diagnostic's why. pick_hint_diagnostic prefers the diagnostic under the cursor, else the most severe. The cursor-local invalid-ident hint is kept for genuinely incomplete commands (no Match → no diagnostics). 5 ambient_hint tests (unknown table, type-mismatch over submit-prose, LIKE-numeric, clean command still submittable, cursor-following). The complex_and_or matrix cell referenced a non-existent column `t`; fixed to a real column so it tests a valid expression as intended. 1118 passing, clippy clean.
This commit is contained in:
+3
-3
@@ -1,11 +1,11 @@
|
||||
---
|
||||
source: tests/typing_surface/where_expression.rs
|
||||
description: "input=\"delete from Things where k > 1 and t like 'a%' or k = 9\" cursor=55"
|
||||
description: "input=\"delete from Things where k > 1 and note like 'a%' or k = 9\" cursor=58"
|
||||
expression: "& a"
|
||||
---
|
||||
Assessment {
|
||||
input: "delete from Things where k > 1 and t like 'a%' or k = 9",
|
||||
cursor: 55,
|
||||
input: "delete from Things where k > 1 and note like 'a%' or k = 9",
|
||||
cursor: 58,
|
||||
state: Valid,
|
||||
hint: Some(
|
||||
Prose(
|
||||
|
||||
Reference in New Issue
Block a user