feat: LOOKUP enforcement in REPLACE/grid-edit + BROWSE dropdown (#60)#64
Merged
Conversation
BROWSE/REPLACE now fully declare, enforce, and render lookups end to end, so this is the first PR that promotes LOOKUP to the README command reference (with an explicit Deviations note — no dBASE III ancestor). Forms still don't offer a picker; that's #59.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Builds on #58 (merged) to make
LOOKUPan actually-enforced, actually-rendered constraint end-to-end via BROWSE:REPLACEandgrid-editreject a value outside a column's declaredLOOKUP, re-resolving the constraint fresh against the live database on every write — never trusting a client-held or previously-cached option list. A value that just became legal (a new row added to the source table) or just stopped being legal is judged correctly.** Warningline rather than locking the column — enforcement never becomes a hard failure mode.BROWSErenders a lookup column as a<select>fed by optionsSession.sendGridDataresolves atgrid-open.DISPLAYlabels show while editing; the stored code shows once committed, so the grid never disagrees withLIST/report output.This is the first PR where
LOOKUPis documented in the README command reference (with a Deviations note — no dBASE III ancestor). Forms (@ SAY GET) still don't offer a picker; that's #59, a separate branch/PR.Plan:
docs/superpowers/plans/2026-07-11-lookup-columns.md(Tasks 6, 10, plus the REPLACE-enforcement half of Task 5)Closes #60.
Test plan
npm test— 431/431 vitest passnpm run build— clean typecheck + buildnpx playwright test— 94/94 passREPLACEaccept/reject/case-sensitivity/live-source/degrade/two-database-scoping;grid-openships exact resolved options and warns on degrade;grid-editrejects a forged off-list message and confirms viaLISTthat nothing was written