chore(frontend): remove dead code, consolidate patterns, update README#155
Open
chore(frontend): remove dead code, consolidate patterns, update README#155
Conversation
- Remove dead code: fileUpload.ts (empty), maplibre/bounds.ts, maplibre/priorityStyle.ts, YieldFileUpload.tsx, CoordinateFileUpload.tsx, fileUploadService.ts, PrescriptionsPage.tsx - Remove commented-out PrescriptionsPage import and route in AppRoutes - Consolidate normalizeErrors into utils/errors.ts; remove duplicate from ProfilePage - Extract page gradient background into utils/theme.ts; update all 6 usages in pages and FieldTable - Rewrite README.md to accurately reflect current structure and conventions Agent-Logs-Url: https://github.com/JosephPBaruch/CharAI/sessions/2018982f-9e14-412a-a709-60990d351466 Co-authored-by: JosephPBaruch <132173774+JosephPBaruch@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Cleanup unused frontend code and reorganize file structure
chore(frontend): remove dead code, consolidate patterns, update README
Apr 16, 2026
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.
The frontend had accumulated unused files, duplicate inline patterns, and an outdated README that no longer reflected the actual structure.
Dead code removed
7 files deleted — none were reachable from any active import path:
types/fileUpload.tstypes/maplibre/bounds.tscomputeBoundsFromGeoJSONnever calledtypes/maplibre/priorityStyle.tspriorityFillColorExpressionnever usedfeatures/farm/CoordinateFileUpload.tsxfeatures/farm/YieldFileUpload.tsxservices/fileUploadService.tspages/PrescriptionsPage.tsxfeatures/farm/index.tsandAppRoutes.tsxcleaned up accordingly.Duplicate patterns consolidated
Page gradient background — a 3-line ternary repeated across 6 files extracted into
src/utils/theme.ts:Error normalization —
ProfilePagehad a privatenormalizeErrorsdoing the same job asnormalizeSignupErrorsinutils/errors.tswith slightly different join logic. The general version is now exported fromutils/errors.tsandProfilePageimports it from there.README rewritten
Previous README described an outdated structure (referenced
App.tsx,ProtectedRouteincomponents/, React Router v6). Replaced with accurate documentation covering the current stack, full annotated directory tree, route table, auth flow, conventions, and testing instructions.