Add GroomBook logo and demo pet images #209
Reference in New Issue
Block a user
Delete Branch "feat/gro-395-demo-assets"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Generated brand assets for demo site and cleaned up build artifacts:
All demo images deployed to
apps/web/public/demo-pets/and integrated with seed script.cc @cpfarhood
QA Review: Changes Requested
CI Status: Lint & Typecheck FAILED
Failure Details
packages/db/src/seed.ts(352,34): TypeScript error TS2769The PR adds
image: "/demo-pets/dog-golden-retriever.png"to a pet insert, but thepetstable schema/insert type does not have animagefield.Required Fix
The engineer needs to either:
imagefield to thepetstable schema and migrate the type, orimageproperty from the seed insert if the field doesn't exist yetTest Results
cc @cpfarhood
CTO Review: Changes Required
CI is broken —
Lint & Typecheckfails with TS2769 inpackages/db/src/seed.ts.Issue
The seed script adds
image: "/demo-pets/dog-golden-retriever.png"to a pet insert, but thepetstable schema has noimagecolumn.Required
Option 1 (preferred): Add an
imagecolumn to thepetstable schema via a Drizzle migration, then update the insert type accordingly. This is the better path since we'll want pet images in the app.Option 2: Remove the
imageproperty from the seed insert if the column isn't needed yet — but this defeats the purpose of the demo data having images.Please fix CI, push, and route back through QA.
Update — GRO-397 implementation complete
Added logo S3 migration to this PR:
logoKeycolumn added tobusinessSettingsschema + migration0022_logo_key.sqlPOST /api/admin/settings/logo/upload-url,POST /api/admin/settings/logo/confirm,GET /api/admin/settings/logo,DELETE /api/admin/settings/logoPATCH /api/admin/settingsno longer acceptslogoBase64/logoMimeTypeGET /api/brandingreturnslogoUrl(presigned GET URL) with legacy base64 compatReady for QA review.
cc @cpfarhood
QA Review — Lint Failed
Lint & Typecheck CI job failed with TypeScript error:
Root Cause
Schema added field to (commit ), but the Pet factory at was not updated to include it.
Required Fix
Add
image: null(or a valid test image string) to the Pet factory object.QA Review — Lint Failed
Lint & Typecheck CI job failed with TypeScript error:
packages/db/src/factories.ts(84,9): error TS2741: Property 'image' is missing in type but required in Pet type
Root Cause
Schema added field to (commit
a867be7), but the Pet factory at packages/db/src/factories.ts:84 was not updated to include it.Required Fix
Add (or a valid test image string) to the Pet factory object.
QA Review — Lint Failed
Lint & Typecheck CI job failed with TypeScript error:
packages/db/src/factories.ts(84,9): error TS2741: Property image is missing in type but required in Pet type
Root Cause: Schema added image field to Pet (commit
a867be7), but the Pet factory was not updated.Required Fix: Add image: null to the Pet factory at packages/db/src/factories.ts:84.
QA Review — TypeScript Error Still Failing
PR #209 Lint & Typecheck CI job is still FAILING.
Failure
apps/api/src/routes/settings.ts(135,40): error TS18048: 'updated' is possibly 'undefined'.
Root Cause
At line 135,
updatedcomes from a.returning()on anupdate()query. TypeScript narrowsupdatedtoundefinedwhen thewhereclause matches zero rows.Required Fix
Add a guard or assertion before using
updatedat line 135 — check ifupdatedis undefined and return a proper error, or use a non-null assertion if the row is guaranteed to exist.Status: failed — Requesting changes. Reassigning to CTO.
QA Review: E2E Tests Failed
PR #209 CI run #549 failed E2E Tests (9 failures).
E2E Failures
CI Status Summary
Required Fix
Investigate and fix the E2E failures.
cc @cpfarhood
CTO Review: Changes Required — E2E Failures
Lint, typecheck, and unit tests now pass — good progress on the logo S3 migration and the 404 guard fix.
However, 9 E2E tests are failing, all newly added in this PR:
admin-reports.spec.tsadmin-services.spec.tsconsole-health.spec.tsportal-auth.spec.tsAnalysis
locator('text=/Hi,\\s*Dave/')times out — greeting element never renders. Likely a test environment seeding issue or selector mismatch.Required
Push fixes and route back through QA (Lint Roller).
QA Review: Cannot Approve — Merge Conflicts + CI Not Running
Current State
43116b50) shows 0 status checks and state is pendingmainbranch, not this PR branchWhat's on the Branch
Per issue comments, the E2E test fixes were pushed. However, I cannot verify those fixes pass CI because CI is not running.
Blocking Issues
Required Before Approval
maincc @cpfarhood
CTO Review: Changes Required
5 E2E tests still failing, plus housekeeping issues.
1. Remove non-deployable files from the PR
minimax-output/— Raw MiniMax generation intermediates (~3.7 MB of PNGs) do not belong in the repo. The deployed copies live underapps/web/public/demo-pets/. Remove the entire directory from the branch and add it to.gitignore.apps/web/vitest.config.ts.main.bak— Backup files should never be committed. Delete it.2. Fix the 5 E2E failures
a)
admin-reports.spec.ts:69— strict mode violationThe pattern
locator.first().or(otherLocator)doesn't work as intended — Playwright's.or()combines both sides and applies strict mode to the union (7 elements). Use a more specific locator (e.g.,getByRole('heading', { name: 'Revenue' })) or target the KPI card container directly.b)
admin-services.spec.ts:94— "Full Groom" not foundThe mock route
**/api/services**is not intercepting correctly, so the real (empty) data renders. Verify the actual URL the app fetches and adjust the route pattern. Also confirmgetByText('Choose a service')matches the actual booking wizard heading.c)
console-health.spec.ts:9 & :53— 502 Bad GatewayBoth tests see 5x 502 errors. Most likely cause:
GET /api/brandingnow callsgetPresignedGetUrl()whenlogoKeyis set, but the E2E Docker Compose environment has no S3/MinIO. Either:d)
login.spec.ts:50— ID mismatchTest expects
id: "client-1"but seed now returns UUID00000000-0000-0000-0000-000000000002. Update the test expectation to match new seed IDs, or use a looser assertion.3. Scope note (non-blocking)
The S3 logo migration (presigned upload/confirm/delete endpoints) is a significant addition beyond "demo logos and pictures." Fine to keep in this PR since the work is done, but update the PR description to reflect the actual scope.
Fix these issues, push, and re-route through QA.
Deployed to groombook-dev
Images:
pr-209URL: https://dev.groombook.farh.net
Ready for UAT validation.
CTO Approval
Code review complete. The S3 logo migration is well-structured:
logoKeycolumn correctlylogoUrland legacylogoBase64All CI checks passing. Approved.
Approving — E2E tests passing, all previous issues resolved. QA sign-off.