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
src/ui/Grid.ts currently has no per-column validation — any typed value commits (see commitEdit()). Add real client-side validation so an invalid edit is rejected inline (cell stays in edit mode with a visible error, or the edit is reverted) rather than silently writing bad data.
Server needs to tell the client each column's type + constraints. Extend whatever WS message currently carries table structure to BROWSE (check src/shared/types.ts and the grid-open / LIST STRUCTURE message shapes) to include type (CHAR/NUM/DATE/TIME/LOGICAL) and any qualifier (TIME(15), NUM(p,s)). Depends on the TIME type work (TIME column type #43).
Grid.ts validates client-side before commit, per type:
DATE — valid calendar date in the expected format.
TIME / TIME(n) — HH:MM, plus minute-granularity check if n is set.
NUM(p,s) — numeric, fits precision/scale.
LOGICAL — .T./.F. (or the existing boolean literal set).
Keep server-side validation too (the TIME type validation from TIME column type #43 already covers REPLACE) — the grid hook is a UX improvement, not a replacement for the authoritative check.
Branch
feature/<name> off release/v1.2.0, PR targets release/v1.2.0. Should land after #43 (TIME type) since it validates against TIME columns.
Tests
Playwright coverage: type an invalid time into a TIME grid cell and assert it's rejected/flagged; type a valid one and assert it commits. Extend tests/assistant.spec.ts or add a focused new spec, following existing grid-interaction patterns.
Definition of done
Per CLAUDE.md → Definition of done: tests green (vitest + playwright), CLAUDE.md BROWSE section updated if shortcuts/behavior changed, changelog entry.
Scope
src/ui/Grid.tscurrently has no per-column validation — any typed value commits (seecommitEdit()). Add real client-side validation so an invalid edit is rejected inline (cell stays in edit mode with a visible error, or the edit is reverted) rather than silently writing bad data.BROWSE(checksrc/shared/types.tsand the grid-open /LIST STRUCTUREmessage shapes) to include type (CHAR/NUM/DATE/TIME/LOGICAL) and any qualifier (TIME(15),NUM(p,s)). Depends on theTIMEtype work (TIME column type #43).Grid.tsvalidates client-side before commit, per type:DATE— valid calendar date in the expected format.TIME/TIME(n)—HH:MM, plus minute-granularity check ifnis set.NUM(p,s)— numeric, fits precision/scale.LOGICAL—.T./.F.(or the existing boolean literal set).TIMEtype validation from TIME column type #43 already coversREPLACE) — the grid hook is a UX improvement, not a replacement for the authoritative check.Branch
feature/<name>offrelease/v1.2.0, PR targetsrelease/v1.2.0. Should land after #43 (TIME type) since it validates against TIME columns.Tests
Playwright coverage: type an invalid time into a
TIMEgrid cell and assert it's rejected/flagged; type a valid one and assert it commits. Extendtests/assistant.spec.tsor add a focused new spec, following existing grid-interaction patterns.Definition of done
Per
CLAUDE.md→ Definition of done: tests green (vitest + playwright), CLAUDE.md BROWSE section updated if shortcuts/behavior changed, changelog entry.