Skip to content

feat: demos adopt LOOKUP columns — overtime + CRM (#61)#66

Merged
DDecoene merged 3 commits into
release/v1.3.0from
feature/61-demo-lookups
Jul 12, 2026
Merged

feat: demos adopt LOOKUP columns — overtime + CRM (#61)#66
DDecoene merged 3 commits into
release/v1.3.0from
feature/61-demo-lookups

Conversation

@DDecoene

Copy link
Copy Markdown
Owner

Summary

demos/overtime.prg and demos/crm.prg adopt the now-complete LOOKUP feature (#58/#59/#60, all merged), exercising both lookup kinds in real, working example apps:

  • overtime.prg: a new SCHEDULES catalog table (SCHEDID, DESCR) becomes the lookup source for EMPLOYEES.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 TO with no tag, before APPEND RECORD) so writing the key field can't move the new record out from under the second form, which field-binds NAME and SCHEDID directly — no more typing a schedule code from memory, it's picked from a dropdown showing "Standard 40h (08:00-16:30)".
  • crm.prg: DEALS.STAGE gets a literal LOOKUP ("Lead","Qualified","Proposal","Won","Lost"), matching the demo's own seeded vocabulary exactly (membership is case-sensitive) — exercising the fixed-list form of LOOKUP in 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 pass
  • npm run build — clean typecheck + build
  • npx 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 of main in 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 added
  • tests/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)

DDecoene added 3 commits July 12, 2026 11:54
overtime.spec.ts gained a 10th test for the Add-Employee dropdown;
corrected the stale count in CLAUDE.md's test inventory.
@DDecoene DDecoene merged commit c312bcd into release/v1.3.0 Jul 12, 2026
2 checks passed
@DDecoene DDecoene deleted the feature/61-demo-lookups branch July 12, 2026 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant