Merged
Conversation
Contributor
Author
|
@codex review |
d32a121 to
3242261
Compare
Contributor
Author
|
The auto-cleanup branch only modified Re-triggering CI. |
3139a09 to
aca2618
Compare
The function was exported but never imported anywhere in the codebase. Confirmed dead via ts-prune and exhaustive grep.
Remove private static isSecretReferenceValue() and isOpSecretValue() from Config class, replacing them with the identical shared exports from @/common/types/secrets. Both methods had byte-identical logic to their shared counterparts and config.ts already imported from that module.
All 9 reactive analytics hooks repeated the same ~45-line boilerplate: API readiness check, analytics namespace validation, ignore-flag cancellation, and error handling. Extract this into a single runAnalyticsEffect<T>() helper that each hook delegates to. Behavior-preserving: identical logic, same exported signatures. -401 lines, +95 lines (net -306 lines).
The ProjectsSection component had a hardcoded className string identical to the CARD_CLASS constant already defined at the top of the file and used by three other components (SessionStatsRow, SpendGraph loading/main). Replace with the shared constant for consistency.
getTokenTotalOrUndefined was a thin wrapper around getTokenTotal (from @/common/types/devtools) that added a null check — but getTokenTotal already handles null/undefined inputs and returns undefined for them. Replace the two call sites with direct getTokenTotal calls and remove the dead function.
The onChat subscription had an inline stall watchdog (manual setInterval + lastChatEventAt tracking + cleanup) that duplicated the createStallWatchdog helper already used by runActivitySubscription and runTerminalActivitySubscription. Replace the inline implementation with the shared helper for consistency and to reduce duplication (-19/+6 lines).
aca2618 to
efccc16
Compare
ethanndickson
approved these changes
Mar 4, 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.
Long-lived PR for small, behavior-preserving cleanups discovered by periodic automated sweeps.
Each push adds at most one low-risk refactor (dead code removal, deduplication, naming, etc.) and advances the checkpoint so subsequent runs skip already-considered commits.
Current changes
Deduplicate secret type guards in Config class: Remove private static
isSecretReferenceValue()andisOpSecretValue()fromConfig, replacing them with the identical shared exports from@/common/types/secrets. Both methods had byte-identical logic to their shared counterparts.Extract shared
runAnalyticsEffecthelper: All 9 reactive analytics hooks inuseAnalytics.tsrepeated the same ~45-line boilerplate (API readiness check, analytics namespace validation, ignore-flag cancellation, error handling). Extracted into a single generic helper, reducing the file by ~310 lines while preserving identical behavior and exported signatures.Use
CARD_CLASSconstant for project cards in LandingPage: TheProjectsSectioncomponent had a hardcoded className string identical to theCARD_CLASSconstant already defined at the top of the file and used by three other components. Replaced with the shared constant for consistency.Auto-cleanup checkpoint: 36e3577
Generated with
mux· Model:anthropic:claude-opus-4-6· Thinking:xhigh· Cost:$—