fix: startup validation, pagination docs, UI consolidation, reveal tests - #1562
Open
10xwhoman wants to merge 2 commits into
Open
fix: startup validation, pagination docs, UI consolidation, reveal tests#156210xwhoman wants to merge 2 commits into
10xwhoman wants to merge 2 commits into
Conversation
- LabsCrypt#1519: add validateLoanConfigOnStartup() mirroring validateEnvVars() pattern — catches config errors, logs to console and logger, calls process.exit(1); update index.ts to call it at the top-level startup path; extend loanConfig.test.ts with validateLoanConfigOnStartup coverage - LabsCrypt#1518: add useReveal.test.tsx with five cases: success, 403 access denied, 410 expired, PII cleared via clearRevealed(), no PII before request resolves - LabsCrypt#1517: move COPY_FEEDBACK_RESET_MS constant into CopyButton.tsx (single source of truth), use it in setTimeout; ui.tsx re-exports from CopyButton for backward compatibility with existing imports - LabsCrypt#1516: add description field to Pagination swagger schema linking to docs/pagination-contract.md Closes LabsCrypt#1519 Closes LabsCrypt#1518 Closes LabsCrypt#1517 Closes LabsCrypt#1516
ogazboiz
requested changes
Aug 3, 2026
ogazboiz
left a comment
Contributor
There was a problem hiding this comment.
the four small fixes are all legit and the useReveal coverage is welcome. but now that main's CI is green again, this branch fails on its own changes:
- backend: your new src/tests/loanConfig.test.ts fails (see the backend job log for the run on the updated branch). there is also a duplicated originalEnv setup block in that file worth cleaning while you are in there.
- frontend: the frontend job is red on the updated branch too, please check that log and fix or rebase.
once those two jobs are green this is good to merge.
if you want to keep contributing, join us on Telegram: https://t.me/+DOylgFv1jyJlNzM0
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.
Resolves four issues across backend config, Swagger docs, frontend component consolidation, and hook test coverage.
Changes
#1519 — Loan config startup validation (mirror env.ts pattern)
validateLoanConfigOnStartup()toloanConfig.tsthat catches config errors, logs to console and structured logger, and callsprocess.exit(1)— identical exit pattern tovalidateEnvVars()index.tsto callvalidateLoanConfigOnStartup()at the top-level startup path before accepting trafficloanConfig.test.tswith avalidateLoanConfigOnStartupdescribe block: success, missing var, out-of-range value#1518 — useReveal test suite
useReveal.test.tsxwith five cases:clearRevealed()— value nulled, mutation reset#1517 — UI component consolidation
COPY_FEEDBACK_RESET_MS = 2000intoCopyButton.tsx(single source of truth) and used it in thesetTimeoutcallui.tsxnow re-exportsCOPY_FEEDBACK_RESET_MSfromCopyButton.tsx— all existing imports continue to work unchanged#1516 — Pagination swagger description
descriptionfield to thePaginationschema inswaggerSchemas.tslinking todocs/pagination-contract.mdCloses #1519
Closes #1518
Closes #1517
Closes #1516