Conversation
…t file-local symbols
…red timing constants, smaller map and dialog hosts
…eturns, as before the split
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.
What changed
A behavior-neutral cleanup of the platform code, Organizations, Reports and Events. Nothing on screen or in any request changes:
Visible in: admin (nothing should change).
Before you start
admin.civfix.dev, once Admin test harness and characterization safety net #38 to Admin stylesheet cleanup, no visual change #42 and this PR have merged to main.git diff --color-moved). This is a campaign PR; the author approved PRs over the 400-line cap for this cleanup.Verify
[Admin]
Reports:
Events:
5. Open "Events", select a cleanup, type in "Update for attendees" and in "Bags collected", then trigger and recover an error the same way. Expect: both values survive.
6. Click "Link reports". Expect: the picker works as before.
Organizations:
7. Open "Organizations", select an org, and open each tab: Profile, Members, Verification, Events. Expect: the same content and actions as before.
8. On Members, open a member's actions menu. Expect: the same menu.
9. On an org with evidence, open "Document 1". Leave it open while the org refreshes in the background. Expect: the viewer closes and keyboard focus stays on the document row.
Shared parts:
10. On the "Dashboard", tap a live-map pin, then close the card. Expect: the same card and legend.
11. On "Users", click "Ban account" and press Escape. Then open a report photo and use the arrow keys. Expect: the dialog and the photo viewer behave as before.
Regression
Everything that shares the moved code: [Admin]
Not covered
Findings addressed
reports-page.tsx(7 components, 10 helpers, the 700-line detail) andevents-page.tsx(the 440-line detail) are split into focused modules.ReportsPageandEventsPagestay exported from their page files.MemberRow,VerificationPanel,CreateOrgSlideOver,OrgProfileFieldsandOrgDetailare split into named parts in the same folder.LiveMap,LeafletMap,DialogHostandLightboxHostare split into named parts and hooks.SEARCH_DEBOUNCE_MS,MAP_SETTLE_MS,QUERY_STALE_MS,QUERY_GC_MS,SHORT_ID_LENGTH,INITIALS_MAX_LETTERS,BYTES_PER_MB, pin sizes, zoom levels, tooltip offset,ACCESS_LOGOUT_PATHandHOME_HASH. Values used across files live inlib/timing.ts,lib/display.tsandlib/bytes.ts.Skeletonand its.skelCSS.reportBucket.??fallbacks.eslint-disable.Decisions for the reviewer
Object.hasOwn. A status that equals anObject.prototypename, such as "constructor", used to crash the row; it now renders as "Needs verification", like any unknown status. Only a server sending a status outside its own enum can reach this. A test pins it.Tests changed
official-author.test.ts) points at the file the chat rows moved to.Verification
pnpm lint,pnpm typecheck,pnpm buildandpnpm testpass: 105 files, 1,087 tests, in 3 runs.🤖 Generated with Claude Code