Skip to content

fix(#390): fix CI failures and add dark mode contrast - #391

Merged
phertyameen merged 3 commits into
bridgelet-org:mainfrom
khaadish:fix/390-ci-and-dark-mode-contrast
Jul 28, 2026
Merged

fix(#390): fix CI failures and add dark mode contrast#391
phertyameen merged 3 commits into
bridgelet-org:mainfrom
khaadish:fix/390-ci-and-dark-mode-contrast

Conversation

@khaadish

Copy link
Copy Markdown
Contributor

Closes #390

Summary

Fixes both problems tracked in #390: the three CI failures and the dark-mode contrast regressions.


Part 1 — CI fixes

1a · confirm-step.tsx — replace stale state with submitPhase enum

Replaced the dual submitted / submitting boolean state with a single SubmitPhase discriminated union ('idle' | 'submitting' | 'success'). The success screen gates on submitPhase === 'success' and buttons disable on submitPhase === 'submitting'. This eliminates the crash described in the issue and makes state transitions explicit.

1b · chain-selector.tsx — make selectedChainId optional

Added a ChainSelectorProps type with selectedChainId?: string (defaults to 'stellar'). The prop is wired to the <select> value. Call sites that omit the prop continue to work; the type system no longer rejects them.

1c · tsconfig.json — switch from Jest to Vitest types

Changed "types": ["jest", "node"]"types": ["vitest/globals", "node"]. This completes the Jest→Vitest migration: tsc now resolves expect() against Vitest's matcher interface, which @testing-library/jest-dom/vitest correctly augments with toBeInTheDocument etc.


Part 2 — Dark mode contrast

Added explicit dark: Tailwind variants to every text/background color pairing in the components listed below. No component now silently inherits an unintended dark-mode default.

File What changed
app/globals.css color-scheme: light dark; body gets dark:bg-slate-950 dark:text-slate-100
components/page-shell.tsx Nav, page heading, description, card wrapper
app/page.tsx Homepage CTA links
components/chain-selector.tsx Label, select, chevron, tooltip
components/claim-status-card.tsx All 6 state panels + badge + card border/bg
components/send-form/index.tsx Step breadcrumb labels, separator, step heading
components/send-form/steps/connect-step.tsx Connected-wallet box, description, button, error, link
components/send-form/steps/details-step.tsx All labels, inputs, selects, action buttons
components/send-form/steps/confirm-step.tsx Summary table, error, Back / Confirm buttons, success panel
components/share-prompt.tsx Wrapper, text, code block, copy button, share links
components/rate-limit-banner.tsx Banner background and text

Verification

npm run typecheck   ✅  0 errors
npm test            ✅  24/24 tests pass (2 suites)
npm run build       ✅  successful Next.js production build, all 10 routes

@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

@khaadish is attempting to deploy a commit to the aminubabafatima8-gmailcom's projects Team on Vercel.

A member of the Team first needs to authorize it.

Part 1 - CI fixes:
- confirm-step.tsx: replace dual submitted/submitting booleans with a
  submitPhase enum ('idle' | 'submitting' | 'success') so state transitions
  are unambiguous and the success screen can never reference an undeclared
  variable
- chain-selector.tsx: add optional selectedChainId prop (defaults to
  'stellar') so call sites that omit it satisfy the type contract
- tsconfig.json: switch types from ["jest","node"] to ["vitest/globals","node"]
  to complete the Jest->Vitest migration; tsc now resolves expect() against
  Vitest's matcher interface which @testing-library/jest-dom/vitest augments

Part 2 - dark mode contrast:
- globals.css: enable color-scheme light dark; add dark body background/text
- Every component that shipped a light-mode color now has an explicit dark:
  counterpart: page-shell, chain-selector, claim-status-card (all panels),
  send-form step breadcrumb, connect-step, details-step, confirm-step,
  share-prompt, rate-limit-banner, homepage

All three CI steps pass after these changes:
  npm run typecheck  - 0 errors
  npm test           - 24/24 tests pass
  npm run build      - successful Next.js production build

Closes bridgelet-org#390
@khaadish
khaadish force-pushed the fix/390-ci-and-dark-mode-contrast branch from 3fb36d8 to 2ab66bd Compare July 28, 2026 17:51
@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
bridgelet Ready Ready Preview, Comment Jul 28, 2026 7:04pm

…pboard

- Replace user.click() with synchronous fireEvent.click() to avoid
  fake-timer deadlock in userEvent v14
- Replace Object.assign(navigator, { clipboard }) with
  Object.defineProperty(navigator, 'clipboard', { ..., configurable: true })
  to avoid TypeError on jsdom's getter-only property
- Add Object.defineProperty for clipboard in 'Copied!' test with a
  resolving mock so the component reaches setCopied(true)
- Add afterEach(() => vi.useRealTimers()) to prevent timer leakage
  between tests after a timeout
@phertyameen
phertyameen merged commit 0b70d5d into bridgelet-org:main Jul 28, 2026
4 checks passed
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.

Ci and dark mode contrast issue

3 participants