Repository navigation
refactor: split large ResearchPage and AddActivityDialog - #143
Merged
Merged
Conversation
BerryUIKI
force-pushed
the
feat/component-splits
branch
from
August 19, 2026 02:35
b84c5c0 to
9831d5f
Compare
BerryUIKI
force-pushed
the
feat/component-splits
branch
from
August 19, 2026 03:36
9831d5f to
414106a
Compare
NoviUIKI
approved these changes
Aug 19, 2026
NoviUIKI
left a comment
Collaborator
There was a problem hiding this comment.
Review summary — PR #143
Verdict: ✅ Approve
Well-executed decomposition. I verified the extraction is behavior-preserving: typecheck passes and the 38 tests covering this code all pass.
Critical
- None.
Important
- None.
Suggestions (non-blocking)
- The
researchOperationErrorbanner is permanent once triggered (ResearchPage.tsx). It ORs five mutations'isErrorstates, and React Query only resetsisErrorfor the mutation that is re-run — so after one failed delete, the banner stays on screen even after later operations succeed, and there's no dismiss. Consider tracking the last failed operation (or adding a dismiss) so the banner reflects current state. ActivityFormFieldstakes ~20 value+callback props. Idiomatic controlled-component extraction, but if the form grows, auseReducer(or form library) in the container would cut the prop surface substantially.- Minor: the
STATUSESlabel nested-ternary in ActivityFormFields.tsx is dense — aRecord<ActivityStatus, MessageKey>lookup (mirroringACTIVITY_TYPES) would read better. - Minor: the
.mutate()error banner is generic (unexpectedError); a per-operation message ("Failed to delete project", etc.) would be more actionable.
Strengths
- Clean split:
ResearchPageandAddActivityDialogkeep all state, queries, mutations, and URL context; the new sections are presentational with value+callback props and fully typed interfaces (MessageKey,ReportType,ActivityType, …). - Fixes a latent bug: the asset-select placeholder in
AddActivityDialogpreviously renderedt("cancel")(i.e. "-- Cancel --"); it now uses the propert("selectAsset")key. - Surfaces previously-silent errors: the archive/complete/delete
.mutate()calls (which swallow failures intoisError) now render arole="alert"banner, matching the error-surfacing direction of PR #141. - Removes the remaining
(t(...) as any)casts (including the one inAddActivityDialognoted in the PR #140 review). - New files get trailing newlines;
git diff --checkis clean.
Verification
tsc --noEmit(apps/desktop): passes.ResearchPage.test.tsx(13),dialogs.test.tsx(20),ActivityList.test.tsx(5): 38/38 pass.git diff --check: clean.
- ResearchPage (695 lines): extract ResearchProjectsSection, ResearchDocumentsSection, ResearchNotesSection into pages/research/components; page keeps state/queries/mutations/URL context - AddActivityDialog (528 lines): extract presentational ActivityFormFields (value + callback props); dialog keeps state, validation, submit, focus trap
NoviUIKI
force-pushed
the
feat/component-splits
branch
from
August 19, 2026 05:17
414106a to
37c65f9
Compare
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
Split two large components (task #6).
Changes