feat: demos adopt LOOKUP columns — overtime + CRM (#61)#66
Merged
Conversation
overtime.spec.ts gained a 10th test for the Add-Employee dropdown; corrected the stale count in CLAUDE.md's test inventory.
This was referenced Jul 12, 2026
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
demos/overtime.prganddemos/crm.prgadopt the now-completeLOOKUPfeature (#58/#59/#60, all merged), exercising both lookup kinds in real, working example apps:SCHEDULEScatalog table (SCHEDID,DESCR) becomes the lookup source forEMPLOYEES.SCHEDID. Add Employee is now check-first, two-form: the id is collected and checked for a duplicate first (a memory variable — it's a search term until the record exists), then the record is created in natural index order (SET INDEX TOwith no tag, beforeAPPEND RECORD) so writing the key field can't move the new record out from under the second form, which field-bindsNAMEandSCHEDIDdirectly — no more typing a schedule code from memory, it's picked from a dropdown showing "Standard 40h (08:00-16:30)".DEALS.STAGEgets a literalLOOKUP ("Lead","Qualified","Proposal","Won","Lost"), matching the demo's own seeded vocabulary exactly (membership is case-sensitive) — exercising the fixed-list form ofLOOKUPin a real demo, alongside overtime's table-lookup form.Plan:
docs/superpowers/plans/2026-07-11-lookup-columns.md(Tasks 11, 12)Closes #61.
Test plan
npm test— 446/446 vitest passnpm run build— clean typecheck + buildnpx playwright test— 94/95 pass. The one failure (assistant.spec.ts› "open database via picker echoes USE DATABASE into the terminal") is a pre-existing environment flake unrelated to this branch — verified by running the identical test against an untouched checkout ofmainin a separate worktree, where it fails identically. Nothing in this PR touches the Assistant sidebar or database picker.tests/DemoSchemas.test.ts— DEALS/EMPLOYEES golden schemas unchanged (LOOKUP is metadata, not a column); new SCHEDULES golden addedtests/overtime.spec.ts— new dropdown test plus all 9 pre-existing tests green (seeding, prep-week, schedule-grid rejection, recalculation, balance, leave, report, CSV all unaffected)tests/crm.spec.ts— all 6 tests green (seed data remains legal under the new stage constraint)