Skip to content

chore: remove dead code, unused imports, and fix CHANGELOG dates - #405

Merged
rickcedwhat merged 2 commits into
mainfrom
chore/401-dead-code-cleanup
Jul 31, 2026
Merged

chore: remove dead code, unused imports, and fix CHANGELOG dates#405
rickcedwhat merged 2 commits into
mainfrom
chore/401-dead-code-cleanup

Conversation

@rickcedwhat-ai

@rickcedwhat-ai rickcedwhat-ai commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Closes #401

Summary

  • Removed dead navigateOnce function from smartRow.ts (superseded by navigateUntilReached)
  • Removed 6 unused imports across useTable.ts, pagination.ts, and resolution.ts
  • Replaced raw console.warn calls with logDebug in headers.ts and glide/headers.ts
  • Removed commented-out console.log in fill.ts
  • Fixed CHANGELOG placeholder dates (2024-12-XX2025-12-29) for v3.0.0 and v3.1.0
  • Removed broken MIGRATION_v4.md link from CHANGELOG (file never existed)

Test plan

  • pnpm exec tsc --noEmit — passes
  • pnpm run test:unit — 313/313 pass
  • pnpm run build — passes (via pre-commit hook)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • Improved grid cell navigation, including more reliable movement, focus handling, accessibility synchronization, and clearer errors when a target cannot be reached.
    • Improved diagnostic logging when scrolling elements are unavailable, while preserving existing fallback behavior.
  • Documentation

    • Updated release notes with refreshed examples, TypeScript generic guidance, and revalidate() documentation.
    • Corrected historical release dates and removed an outdated migration-guide reference.

- Remove dead `navigateOnce` function from smartRow.ts (superseded by navigateUntilReached)
- Remove unused imports: TYPE_CONTEXT, ImportedSortingStrategies, ImportedPaginationStrategies,
  ImportedDedupeStrategies (useTable.ts), waitForCondition (pagination.ts), Page (resolution.ts)
- Replace console.warn with logDebug in headers.ts and glide/headers.ts
- Remove commented-out console.log in fill.ts
- Fix CHANGELOG placeholder dates (2024-12-XX → 2025-12-29) for v3.0.0 and v3.1.0
- Remove broken MIGRATION_v4.md link from CHANGELOG (file never existed)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@rickcedwhat-ai

rickcedwhat-ai commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator Author

🤖 Bot HQ

🔗 Issue Link

🔗 Closes #401


🔍 AI Review

  • 🔍 Request AI review

✅ Review complete — no blocking issues.

📊 This PR: $0.1009 · Repo today: $0.00 / $1.00 · Month: $1.43 / $10.00

Review History (2 rounds)
Round Date Commit In Tokens Out Tokens Cost Summary
1 2026-07-30 4179fa5 49,392 264 $0.0507 Removal of navigateOnce breaks alternative nav path (1 issue)
2 2026-07-31 ba7db2b 49,775 83 $0.0502 No issues found

This comment is managed by the bot — do not edit directly.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 8b474fce-145e-4876-9602-be0b08c6bce6

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@rickcedwhat-ai

Copy link
Copy Markdown
Collaborator Author

AI Review

PR #405: Dead code removal, unused imports cleanup, console calls replaced with logDebug, and CHANGELOG date fixes. Review found 1 issue: a removed function that may break backward compatibility in certain navigation paths.

📋 1 issue — expand to copy prompt
You are an AI code reviewer resolving findings from a pull request review.

For each issue below:
1. Determine whether the finding is valid.
2. If valid — fix the code, commit your changes to the branch, then record [N] fix.
3. If not valid (false positive or intentional design) — record [N] skip - <your reason>.

After addressing all issues, post a single comment to this PR with one line per issue:
  [N] fix
  [N] skip - reason

Do not reply to the user who shared this prompt — reply directly in the PR.
---

[1] Removal of navigateOnce breaks alternative nav path — src/smartRow.ts:181
The `navigateOnce` function was removed from `_navigateToCell`, but it represents a fallback navigation strategy when the main `navigateUntilReached` loop isn't applicable. If this was the only code path for certain grid types or configurations, removing it without replacing it could cause navigation failures. Verify that `navigateUntilReached` (the replacement loop) covers all use cases the removed function handled, particularly for grids without `getActiveCell` or with unusual focus behavior.
[1] Removal of navigateOnce breaks alternative nav path — src/smartRow.ts:181

The navigateOnce function was removed from _navigateToCell, but it represents a fallback navigation strategy when the main navigateUntilReached loop isn't applicable. If this was the only code path for certain grid types or configurations, removing it without replacing it could cause navigation failures. Verify that navigateUntilReached (the replacement loop) covers all use cases the removed function handled, particularly for grids without getActiveCell or with unusual focus behavior.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/presets/glide/headers.ts`:
- Line 54: Update HeaderStrategies.scrollRight so the no-scroller fallback
returns the visible headers before reaching the cleanup scrollerHandle.evaluate
call; alternatively, guard that cleanup against a null handle while preserving
the existing fallback result.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 4714bed2-2b31-4a93-a80a-5ae34852cc7e

📥 Commits

Reviewing files that changed from the base of the PR and between 4f14b86 and 4179fa5.

📒 Files selected for processing (8)
  • CHANGELOG.md
  • src/presets/glide/headers.ts
  • src/smartRow.ts
  • src/strategies/fill.ts
  • src/strategies/headers.ts
  • src/strategies/pagination.ts
  • src/strategies/resolution.ts
  • src/useTable.ts
💤 Files with no reviewable changes (3)
  • src/strategies/pagination.ts
  • src/useTable.ts
  • src/smartRow.ts

Comment thread src/presets/glide/headers.ts
When no scroller element is found, the scroll-reset call after the
if/else block would crash on el!.scrollLeft. Wrap it with isScrollerFound.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@rickcedwhat-ai

Copy link
Copy Markdown
Collaborator Author

AI Review — Round 2

PR #405 successfully removes dead code, unused imports, and fixes CHANGELOG dates. All changes are low-risk removals and diagnostic improvements with TypeScript verification passing.

✅ No actionable issues found.

@rickcedwhat
rickcedwhat merged commit d80637f into main Jul 31, 2026
14 checks passed
@rickcedwhat
rickcedwhat deleted the chore/401-dead-code-cleanup branch July 31, 2026 23:01
@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-07-31 23:01 UTC

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.

chore: remove dead navigateOnce, unused imports, stale console.warn calls

2 participants