Clean up, feature upgrades, and codebase audit fixes - #6
Merged
Conversation
The `noImplicitAny: false` setting was undermining `strict: true`. Removing it only introduces 1 new TS7006 error (in build/zipper), well within tolerance. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Delete app/utils/colorful-logger.ts (no-op logger, nothing imports it) - Delete app/utils/const.ts (ANSI color codes, only used by ColorType) - Remove ColorType from types/index.ts (only used by dead logger) - Remove barrel exports from utils/index.ts - Keep SKILL_COLORS in constants (actively used by ExpChart) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace text-red-500, text-green-500, text-blue-500, text-purple-500, border-slate-*, bg-slate-*, and color="aqua" with theme-aware alternatives (text-destructive, text-primary, text-accent-foreground, text-secondary-foreground, border-border, border-accent, bg-accent, hsl(var(--primary))) across 8 files: - TrackedHistory: HP used, net profit, drop values - Profile: gained exp, "Current" badge - ProfileCard: hour exp, week exp, levels gained - Performance: damage values - EquipmentDisplay: enchant colors - LoadingSpinner: ring loader color - Tabs: selected/hover border colors - statRowHelpers: damage row color Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…eCSVLine - Create app/utils/csv-helpers.ts with escapeCSVField and parseCSVLine - Add tests in app/__tests__/csv-helpers.test.ts (10 test cases) - Remove duplicated escapeCSVField from csv-tracker.ts and storage-service.ts - Replace inline CSV parsing loops with parseCSVLine in csv-tracker.ts and storage-service.ts - Move getUserStatsCSVHeader into storage-service.ts, delete legacy user-stats-storage.ts - Add csv-helpers barrel export, remove user-stats-storage barrel export Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace uuid import with native crypto.randomUUID() in scrapeScreenData.ts - Remove uuid from dependencies (no other usage) - Remove deepmerge from devDependencies (unused) - Remove vite-plugin-node-polyfills from all build configs (no Node.js APIs used in app code; was only needed for uuid) - Remove colorfulLog import from make-manifest-plugin (was importing from deleted app/utils/colorful-logger.ts) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Create app/utils/time-constants.ts with MS_PER_MINUTE, MS_PER_HOUR, MS_PER_DAY, MS_PER_WEEK - Add tests in app/__tests__/time-constants.test.ts (4 test cases) - Replace 90 * 24 * 60 * 60 * 1000 with 90 * MS_PER_DAY in storage-service.ts - Replace 3_600_000 and 86_400_000 with MS_PER_HOUR and MS_PER_DAY in useUntrackedExp.ts - Add time-constants barrel export Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove redundant messageListener and justUpdatedViaMessageRef from useTrackedDataQuery - Remove redundant messageListener and justUpdatedViaMessageRef from useUserStatsQuery - Fix double-invalidation: remove refetchQueries calls from storage listeners in useTrackedDataQuery, useSessionBaseline, and useUntrackedExp - Change useUserStatsQuery refetchOnMount from false to "always" for fresh data - Add sessionBaseline and weeklyStats invalidation on UPDATE_USER_STATS in useGlobalDataSync Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add onError handler to clearMutation in useTrackedDataQuery - Add onError handler to clearByHourMutation in useTrackedDataQuery - Add onError handler to saveMutation in useItemValuesQuery Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…downTable Extract two sub-components to reduce cognitive load. Add aria-expanded, keyboard navigation, and role attributes to expandable rows for accessibility. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…rror Remove the unused CSS content_scripts entry from manifest.js since content.css is empty. Replace console.error in storage/base.ts with a silent catch comment. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…erver scope Add aria-label to the JSON copy button in DataView. Narrow the MutationObserver in stats content script to #mainContent with document.body fallback. Add beforeunload cleanup listener. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add error logging to 7 silent catch blocks in background service worker - Increase stats tab timeout from 10s to 30s - Add exp value bounds validation (reject < 0 or > 10B) - Add isValidScreenData() runtime type guard for Chrome messages - Update skill level regex to handle comma-formatted numbers - Add try/finally to downloads API, increase URL revoke delay to 5s Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
Major cleanup, feature upgrades, and codebase audit across the Syrnia Tracker extension.
Codebase Audit Fixes
noImplicitAnyoverride from tsconfig, delete dead code (colorful-logger, const.ts, ColorType)uuidwith nativecrypto.randomUUID(), remove unused deps (deepmerge, vite-plugin-node-polyfills)useGlobalDataSynchandleronErrorhandlers to TanStack Query mutationsCalendar Improvements
Calendar/shared.tsxUntracked EXP Resolution System (NEW)
useUntrackedResolutionhook with gap grouping, initial row generation, and save logicresolveUntrackedExpRecordsmarks records resolved;useUntrackedExpfilters them outPrevious Feature Work (on this branch)
Test plan
🤖 Generated with Claude Code