Fix: CI migration coverage, stale docs, ui-demo gaps, cn() duplication#1259
Merged
Conversation
Add a migration-paths job using dorny/paths-filter so migration-check only triggers on PRs that touch backend/migrations/ or backend/package.json (always runs on pushes to main). Add migrate:down loop and second migrate:up to catch irreversible migrations and ordering bugs before they reach staging.
…, EmptyState
Button.tsx, Card.tsx and EmptyState.tsx each defined an identical local
cn(clsx+twMerge) function. Replace all three with import { cn } from
'@/app/utils/cn', the shared source of truth already used by Input and Modal.
Remove the now-unused clsx and twMerge imports from each file.
…rom production Add notFound() guard so the /[locale]/ui-demo route returns 404 in production builds. Extend the gallery from 4 components (Button, Input, Card, Modal) to 10, adding Skeleton (Skeleton/SkeletonText/SkeletonCard/SkeletonRow), EmptyState, StatusIndicator, LoanStatusBadge, Tooltip, PaginationControls, CopyButton and ThemeToggle. Add a SectionHeading helper to reduce repetition.
Update every stale section to match the actual codebase: - Tech Stack: add Zustand, React Query, freighter-api, next-intl, Sentry, Framer Motion, Recharts; remove Stellar Wallet Kit (never integrated) - Available Scripts: add test, test:watch, test:e2e, typecheck, format, audit:a11y; correct lint description (prettier --check, not ESLint) - State Management: document six Zustand stores instead of planned Context API - Wallet Integration: document @stellar/freighter-api instead of planned kit - Component Library: document all 22 ui/ components with props and descriptions - Routing: replace /,/404 with the real /[locale]/* route table - Project Structure: remove non-existent tailwind.config.ts; document Tailwind 4 CSS-first setup via globals.css @import and @theme tokens - Testing: document Jest unit tests and Playwright e2e specs as shipped
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
Four independent issues addressed in separate commits on this branch:
closes #1252
closes #1245
closes #1246
closes#1248
[CI] Add migration-from-scratch CI job (#1252)
The
migration-checkjob already had a Postgres service and ranmigrate:up, but was missing:backend/migrations/**orbackend/package.json, while always running on pushes tomainChanges:
.github/workflows/ci.yml— add amigration-pathsjob usingdorny/paths-filter@v3; makemigration-checkdepend on it with anifguard; extend the job with a full down-loop then a secondmigrate:uprun[Docs] Rewrite stale frontend/README.md (#1245)
Every section of the README described planned features as if they hadn't shipped. Updated to reflect the actual codebase:
@stellar/freighter-api, next-intl, Sentry, Framer Motion, Recharts; remove never-integrated Stellar Wallet Kittest,test:watch,test:e2e,typecheck,format,audit:a11y; correctlintdescription (prettier --check, not ESLint)@stellar/freighter-apiusage instead of the planned kitui/components with prop tables/and/404table with the full/[locale]/*route listtailwind.config.ts; document Tailwind 4's CSS-first@import "tailwindcss"+@themetoken approach inglobals.cssChanges:
frontend/README.md[Docs] Extend ui-demo gallery and gate route from production (#1246)
The
ui-demoroute only showcased 4 of 22 components and silently shipped to production under every locale.notFound()called at the top of the page whenNODE_ENV === "production"; the route returns 404 in all production buildsChanges:
frontend/src/app/[locale]/ui-demo/page.tsx[Frontend] Remove duplicate cn() helpers in ui/ components (#1248)
Button.tsx,Card.tsx, andEmptyState.tsxeach copy-pasted an identical localcn(clsx+twMerge)function instead of importing the shared helper already used byInput.tsxandModal.tsx.cnfunction and the unusedclsx/twMergeimports from all three filesimport { cn } from "@/app/utils/cn"to eachChanges:
frontend/src/app/components/ui/Button.tsx,Card.tsx,EmptyState.tsxTest plan
backend/migrations/and verify themigration-checkjob runs; open one that does not and verify it is skippedmigration-checkpasses the full up → down → up cycle on the 34 existing migrationsnpm run typecheckinfrontend/— should pass with no new errors/en/ui-demoin development — should render all sections including Skeleton, EmptyState, etc.npm run build) and confirm/en/ui-demoreturns 404npm test— existing unit tests should still pass (cn() change is behaviour-preserving)package.jsonscriptsFiles changed