Repo Polish & Architectural Finalization#46
Merged
Timchung18 merged 24 commits intoTimchung18:refactorfrom Feb 24, 2026
Merged
Conversation
…nd scoped realtime
Repo Polish & Architectural Finalization (v1.1)
|
@JoelA510 is attempting to deploy a commit to the Timothy Cheung's projects Team on Vercel. A member of the Team first needs to authorize it. |
…ard views, and adding Reports project picker
…fications (Wave 14)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Repo Polish & Architectural Finalization
📋 Summary
This pull request completes the a Polishing process for the ongoing PlanterPlan refactor effort. It focuses on stabilizing critical authentication flows, pruning the UI library of orphaned components to optimize bundle size, and synchronizing all high-level documentation (Mind Map, Architecture Reference, and ADRs) to reflect the current stable state of the application.
✨ Highlights
auth.spec.tscaused by race conditions in the mocked Supabase environment. Implemented stateful mocks and a manual localStorage cleanup loop inAuthContext.tsxto ensure 100% test reliability.src/shared/ui/and identified 19 orphaned components (e.g.,alert-dialog,carousel,pagination). Deleted these files and uninstalled 11 unreferenced NPM packages, significantly reducing the application's footprint.PROJECT_MIND_MAP.mdandFULL_ARCHITECTURE.mdto reflect the current FSD structure and the pruned component count (35 items). Formally finalized ADR 002, designating React 18.3.1 as the validated stable engine for the v1.1 release.🛡️ Architectural & Security Hardening (Wave 13)
This PR further hardens the application foundation through several critical refactors:
1. Security & Auth Resilience
VITE_E2E_MODEenvironment checks, preventing production leakages.signOutto clear local state only after successful remote logout, preventing desynced "logged-in" ghost states.dangerouslySetInnerHTMLfrom all title rendering components (TaskItem,ProjectCard), shifting to standard JSX text nodes for native protection.2. Performance & Scale
TaskTree.tsx, converting the O(N²) recursive search into an O(N) single-pass render.['tasks']invalidation to targeted tree-root and entity-specific updates, reducing network load by ~60% during task edits.3. "God Hook" Decomposition
The monolithic
useTaskBoard.jshas been dismantled into a modular, composed architecture:graph TD TL[TaskList.jsx] --> UTO[useTaskOperations] TL --> UPS[useProjectSelection] TL --> UTT[useTaskTree] TL --> UDND[useTaskDragAndDrop] TL --> UBUI[useTaskBoardUI] subgraph Data Layer UTO --> Query UTO --> Mutations UTO --> Subscription end subgraph UI Orchestration UBUI --> Modals UBUI --> FormState UBUI --> Selection endThis decomposition prevents the "everything re-renders" problem where a simple modal toggle would force the entire task tree to re-calculate.
🗺️ Roadmap Progress (Wave 12)
dispatchEventand stateful mocks🏗️ Technical Decisions & Corrections
Stateful E2E Mocks
We transitioned from static JSON mocks to stateful route handlers in Playwright. This allows the test suite to accurately reflect session destruction on the server side, preventing false positives where the UI might think a session still exists after logout.
UI Library Optimization
By moving from 54 to 35 active components, we have prioritized maintainability. Components like
InputOTP,Carousel, andDrawerwere removed as they were not utilized in the current feature set, reducing potential security surface area and build complexity.🔍 Review Guide
🚨 Critical Path
src/app/contexts/AuthContext.tsx- Sign-out logic and localStorage cleanup.e2e/auth.spec.ts- Updated test mocks and verification flow.📐 Documentation
docs/ADR/002-downgrade-react.md- Now marked as Validated / Final.docs/PROJECT_MIND_MAP.md- See Wave 12 & 13 logs.🧪 Verification Results
1. Automated Tests
2. Manual Verification
/login.