chore: quick-win P1 cleanup — quotes/imports, dead scripts, unused imports, stale docs#245
Merged
Conversation
…ports, stale docs Addresses 4 of the smaller P1 items from #221: - useAuth.tsx/useTimeTracking.tsx switched from single quotes and relative imports to double quotes and the @/ alias, matching the rest of the codebase (these are the two most-imported hooks in the app). - Deleted the four root-level one-off recovery scripts (data-recovery.js, debug-archive.js, emergency-migration.js, enhanced-recovery-check.js) — all referenced pre-refactor camelCase localStorage keys that don't match the current STORAGE_KEYS, so they were non-functional against the current data shape. - Swept unused imports/vars across the 10 files named in the audit (verified by temporarily enabling @typescript-eslint/no-unused-vars, fixing everything it flagged, then reverting the rule change). AuthDialog.tsx's handleSignUp/signUp destructure was dead code, not just an unused import — there's no sign-up UI anywhere in the app, only sign-in. - Regenerated AGENTS.md's test file inventory table: 14 files/187 tests was stale, now 31 files/~338 tests with descriptions for the 17 new files (Electron IPC, background timer, keyboard shortcuts, data recovery, etc). Not done: the remaining 3 larger P1 items (TS strictness, ClientSheet/ CategorySheet form duplication vs ProjectSheet's React Hook Form pattern, electron/*.ts test coverage) — each is a bigger, standalone change better suited to its own PR.
Completes the previous commit — the quote/import fixes, unused-import sweep, and AGENTS.md test inventory regeneration didn't get staged correctly the first time.
Deploying timetrackerpro with
|
| Latest commit: |
4899b8b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://8e57d74a.timetrackerpro.pages.dev |
| Branch Preview URL: | https://chore-221-p1-quick-wins.timetrackerpro.pages.dev |
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
Addresses 4 of the 7 P1 items from #221 (the smaller, mechanical ones). The 3 remaining P1 items (TS strictness,
ClientSheet/CategorySheetform duplication, electron test coverage) are each a bigger standalone change and better suited to their own PRs.Type of Change
Related Issue
Addresses P1 items in #221 (not closing — issue still tracks 3 larger P1 items)
Changes Made
useAuth.tsx/useTimeTracking.tsx: switched from single quotes + relative imports to double quotes + the@/alias, matching the rest of the codebase. These are the two most-imported hooks in the app.data-recovery.js,debug-archive.js,emergency-migration.js,enhanced-recovery-check.js) — all referenced pre-refactor camelCase localStorage keys (archivedDays,tasks,projects) that don't match the currentSTORAGE_KEYS(timetracker_archived_days, etc.), so they were non-functional against the current data shape.KanbanBoard.tsxwas already clean). Verified by temporarily flipping@typescript-eslint/no-unused-varsfromofftowarnineslint.config.js, fixing everything it flagged across all 10 files, confirming zero warnings remained, then reverting the config change (not committed — this PR doesn't touch lint config). Notable one:AuthDialog.tsx'shandleSignUp/signUpdestructure wasn't just an unused import, it was a fully dead function — there's no sign-up UI anywhere in the app, only sign-in (verified in a running dev server).supabaseService.test.tsnow exists (15 tests covering upsert-only bulk saves/deletes) but is still partial coverage against the 1100+ line service — the "zero test coverage" P1 claim is stale but not fully resolved.Checklist
Documentation
General
mainpnpm lintandpnpm build(did not runpnpm test— not requested this session)Notes for Reviewers
Manually verified in a running dev server after the unused-import sweep: Dashboard, Archive page, and the Sign In dialog (to confirm removing
AuthDialog's deadhandleSignUpdidn't break anything) all render and function correctly. No new console errors — one pre-existing unrelatedmotion/CardforwardRef warning shows up but predates every change in this PR.pnpm lintandpnpm buildboth clean.