Skip to content

chore: quick-win P1 cleanup — quotes/imports, dead scripts, unused imports, stale docs#245

Merged
AdamJ merged 2 commits into
mainfrom
chore/221-p1-quick-wins
Jul 3, 2026
Merged

chore: quick-win P1 cleanup — quotes/imports, dead scripts, unused imports, stale docs#245
AdamJ merged 2 commits into
mainfrom
chore/221-p1-quick-wins

Conversation

@AdamJ

@AdamJ AdamJ commented Jul 3, 2026

Copy link
Copy Markdown
Owner

Summary

Addresses 4 of the 7 P1 items from #221 (the smaller, mechanical ones). The 3 remaining P1 items (TS strictness, ClientSheet/CategorySheet form duplication, electron test coverage) are each a bigger standalone change and better suited to their own PRs.

Type of Change

  • Other (code quality cleanup)

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.
  • Deleted 4 stale root-level scripts (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 current STORAGE_KEYS (timetracker_archived_days, etc.), so they were non-functional against the current data shape.
  • Unused-imports sweep across the 10 files named in the audit (KanbanBoard.tsx was already clean). Verified by temporarily flipping @typescript-eslint/no-unused-vars from off to warn in eslint.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's handleSignUp/signUp destructure 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).
  • Regenerated AGENTS.md's test file inventory table — it said "187 tests across 14 files"; actual count is ~338 tests across 31 files. Added descriptions for the 17 files missing from the table (Electron IPC handler tests, background timer notifier, keyboard shortcuts, data recovery, Settings page, etc). Also noted that supabaseService.test.ts now 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

  • AGENTS.md test inventory table updated as part of this change

General

  • Branch is up to date with main
  • No unrelated files included in this PR
  • Tested locally by invoking the pnpm lint and pnpm build (did not run pnpm 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 dead handleSignUp didn't break anything) all render and function correctly. No new console errors — one pre-existing unrelated motion/Card forwardRef warning shows up but predates every change in this PR.

pnpm lint and pnpm build both clean.

AdamJ added 2 commits July 3, 2026 17:16
…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.
@github-actions github-actions Bot added automation For items related to release/documentation/workflow automations frontend labels Jul 3, 2026
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying timetrackerpro with  Cloudflare Pages  Cloudflare Pages

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

View logs

@AdamJ AdamJ added this to Timetraked Jul 3, 2026
@github-project-automation github-project-automation Bot moved this to Backlog in Timetraked Jul 3, 2026
@AdamJ AdamJ moved this from Backlog to In review in Timetraked Jul 3, 2026
@AdamJ AdamJ merged commit e329353 into main Jul 3, 2026
3 checks passed
@AdamJ AdamJ deleted the chore/221-p1-quick-wins branch July 3, 2026 22:45
@github-project-automation github-project-automation Bot moved this from In review to Done in Timetraked Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation For items related to release/documentation/workflow automations frontend

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant