Skip to content

fix(ci): remove unused TS imports + fix stale stats test dates - #22

Open
erudenko wants to merge 4 commits into
fix/ci-type-errors-and-stale-test-datefrom
fix/ci-typescript-and-stats-dates
Open

fix(ci): remove unused TS imports + fix stale stats test dates#22
erudenko wants to merge 4 commits into
fix/ci-type-errors-and-stale-test-datefrom
fix/ci-typescript-and-stats-dates

Conversation

@erudenko

Copy link
Copy Markdown
Member

Summary

Fixes CI runs 24065489776, 24063290384, 24029941408, 24029941414.

Two root causes addressed:

  1. TypeScript unused imports (TS6133/TS6196) — removed unused imports in tools/claudeup-core that caused tsc --noEmit to fail under noUnusedLocals:

    • conventions-integration.test.ts: removeGitignoreEntries (never called)
    • doctor.test.ts: vi (never used)
    • conventions-manager.ts: existsSync (unused after refactor)
    • doctor.ts: InstalledPluginEntry type (parameter removed)
  2. Stale hardcoded test datesplugins/stats tests had a hardcoded date of 2026-03-26 that fell outside the 7/14-day query windows used by getSessionSummary, getTopTools, and getDurationTrend, causing those tests to return zero results and fail assertions.

Fix

  • Removed unused imports flagged by TS6133/TS6196 in tools/claudeup-core
  • Replaced hardcoded "2026-03-26" with dynamic TODAY/YESTERDAY/TWO_DAYS_AGO constants in plugins/stats/tests/db.test.ts and plugins/stats/tests/integration.test.ts so the tests stay green regardless of when CI runs

Note on base branch

main in this repo is a distribution-only orphan branch. This PR targets fix/ci-type-errors-and-stale-test-date, the source-code branch that CI workflows run against.

erudenko and others added 4 commits April 7, 2026 13:48
…h detection

Board auto-opens in a tmux split pane when tmux is available, giving the
display tool a real TTY with proper terminal dimensions. Any keypress
closes the pane. Falls back to inline rendering when not in tmux.

Replace the 3-step termW() fallback (stdout/COLUMNS/80) with a 5-step
detection chain: stdout.columns → $COLUMNS → tmux pane_width → parent
TTY via stty → 120 default. Remove the --width flag and
Object.defineProperty monkey-patch hack.

Closes #10

Co-Authored-By: Magus <magus@madappgang.com>

Crafted with agentic harness Magus (https://github.com/MadAppGang/magus)
…HAs to 4bac22c

The release script syncs tools/table/index.ts into plugin lib/ dirs.
The termW() improvements must live in the shared source to survive syncs.

Co-Authored-By: Magus <magus@madappgang.com>

Crafted with agentic harness Magus (https://github.com/MadAppGang/magus)
Co-Authored-By: Magus <magus@madappgang.com>

Crafted with agentic harness Magus (https://github.com/MadAppGang/magus)
TypeScript type check (tsc --noEmit) fails on main with four TS6133/TS6196
errors — unused imports that were left behind after refactors:

  • conventions-integration.test.ts: removeGitignoreEntries (never called)
  • doctor.test.ts: vi (never used)
  • conventions-manager.ts: existsSync (never used after refactor)
  • doctor.ts: InstalledPluginEntry type (parameter removed)

Stats tests (db.test.ts, integration.test.ts) were using the hardcoded date
"2026-03-26" which has drifted outside the 7/14-day query windows, causing
getSessionSummary, getTopTools and getDurationTrend tests to return zero
results and fail assertions.

Fix: replace hardcoded dates with dynamic TODAY/YESTERDAY/TWO_DAYS_AGO
constants so the tests stay green regardless of when CI runs.

Fixes CI runs: 24065489776, 24063290384, 24029941408, 24029941414

https://claude.ai/code/session_01Vc3jfA2et2zDDpenc4EcrW

Copy link
Copy Markdown
Member Author

This PR has a merge conflict in plugins/stats/tests/db.test.ts (both sides compute today's date, but base uses an inline const today while this branch uses the module-level TODAY constant).

A conflict-free version has been opened as #23 (fix/ci-typescript-and-stats-dates-resolvedfix/ci-type-errors-and-stale-test-date) with the conflict resolved in favour of TODAY. This PR can be closed once #23 is merged.

https://claude.ai/code/session_01WD9RM5hfssu3RoasScyZXw


Generated by Claude Code

Copy link
Copy Markdown
Member Author

Superseded by PR #24 which contains the same code fixes (unused TS imports + stale test dates) plus the missing CI workflow trigger fix. PR #24 is the recommended PR to merge — it's a minimal, focused diff with no extra feature commits.

CI is now unblocked on PR #24: the workflow triggers on fix/ci-type-errors-and-stale-test-date (the base branch for all these PRs) have been updated to fire on that branch, so CI can now validate the fixes.


Generated by Claude Code

erudenko added a commit that referenced this pull request Apr 12, 2026
The push and pull_request triggers were locked to `main` and
`fix/ci-type-errors-and-stale-test-date`. Any new fix branch was
invisible to CI — exactly the pattern seen in PRs #22, #23, #28, #31
where only GitGuardian ran, not the actual test suite.

Remove the `branches` list entirely so CI fires on any branch/PR that
touches the relevant paths. Path filters still limit noise to changes
that actually affect plugins, claudeup-core, or the marketplace config.
This was referenced Apr 12, 2026
This was referenced Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants