Skip to content

fix(lint): in api test - #1

Merged
shouze merged 1 commit into
mainfrom
fix-lint-in-api-test
Feb 19, 2026
Merged

fix(lint): in api test#1
shouze merged 1 commit into
mainfrom
fix-lint-in-api-test

Conversation

@shouze

@shouze shouze commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings February 19, 2026 01:51
@github-actions

Copy link
Copy Markdown

Coverage after merging fix-lint-in-api-test into main will be

97.45%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   aggregate.ts100%100%100%100%
   api.ts100%100%100%100%
   group.ts100%100%100%100%
   output.ts98.91%100%94.74%99.39%45
   render.ts97.20%100%100%97.14%142–145
   upgrade.ts77.01%100%88.89%75.64%128, 130–132, 79–93
src/render
   filter.ts100%100%100%100%
   highlight.ts99.29%100%100%99.01%184–185
   rows.ts100%100%100%100%
   selection.ts100%100%100%100%
   summary.ts100%100%100%100%

@shouze shouze self-assigned this Feb 19, 2026
@shouze
shouze merged commit ed62123 into main Feb 19, 2026
7 checks passed
@shouze
shouze deleted the fix-lint-in-api-test branch February 19, 2026 01:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the test file by extracting a test helper function to module scope, following established codebase conventions for test fixture creation.

Changes:

  • Extracted makeFetchItem helper function from inline definition within a single test case to module scope
  • Renamed the helper from makeItem to makeFetchItem for better clarity
  • Updated references to use the new helper function name

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

shouze added a commit that referenced this pull request Aug 23, 2026
Apply fixes for determinism, redundant computation, and UX documentation:

**scroll-cooldown.ts + scroll-cooldown.test.ts** — Fix non-deterministic test
- recordScroll() now accepts optional \`now\` parameter (default: Date.now())
- Tests pass explicit timestamp instead of relying on live clock
- Eliminates race condition where Date.now() advances between test capture
  and function call, causing flaky assertions

**render.ts** — Remove redundant repoSelected recomputation
- Use group.repoSelected directly instead of recomputing from extractSelected
- Comment clarifies that repoSelected is kept in sync by selection logic
  in tui.ts and render/selection.ts, removing per-frame overhead

**docs/architecture/components.md** — Clarify double-click detection ownership
- Update mouse hit-test component description: remove claim that hitTestClick()
  handles double-click detection (it doesn't — only maps coordinates to row+zone)
- Add note: double-click detection is implemented in tui.ts via timestamp tracking

**src/tui.ts** — Document mouse click semantics
- Add explicit comment explaining single-click (navigate) vs double-click (action)
- Reference docs/usage/interactive-mode.md § Mouse support for UX spec
- Clarifies this is a UX feature complementing keyboard shortcuts

Fixes Copilot review issues:
- #1: Deterministic test (scroll-cooldown.test.ts:22)
- #2: Accept 'now' parameter (scroll-cooldown.ts:26)
- #3: Document click semantics (tui.ts:391)
- #4: Clarify hit-test responsibility (components.md:115)
- #5: Remove redundant repoSelected computation (render.ts:577)
shouze added a commit that referenced this pull request Aug 23, 2026
Apply fixes for determinism, redundant computation, and UX documentation:

**scroll-cooldown.ts + scroll-cooldown.test.ts** — Fix non-deterministic test
- recordScroll() now accepts optional \`now\` parameter (default: Date.now())
- Tests pass explicit timestamp instead of relying on live clock
- Eliminates race condition where Date.now() advances between test capture
  and function call, causing flaky assertions

**render.ts** — Remove redundant repoSelected recomputation
- Use group.repoSelected directly instead of recomputing from extractSelected
- Comment clarifies that repoSelected is kept in sync by selection logic
  in tui.ts and render/selection.ts, removing per-frame overhead

**docs/architecture/components.md** — Clarify double-click detection ownership
- Update mouse hit-test component description: remove claim that hitTestClick()
  handles double-click detection (it doesn't — only maps coordinates to row+zone)
- Add note: double-click detection is implemented in tui.ts via timestamp tracking

**src/tui.ts** — Document mouse click semantics
- Add explicit comment explaining single-click (navigate) vs double-click (action)
- Reference docs/usage/interactive-mode.md § Mouse support for UX spec
- Clarifies this is a UX feature complementing keyboard shortcuts

Fixes Copilot review issues:
- #1: Deterministic test (scroll-cooldown.test.ts:22)
- #2: Accept 'now' parameter (scroll-cooldown.ts:26)
- #3: Document click semantics (tui.ts:391)
- #4: Clarify hit-test responsibility (components.md:115)
- #5: Remove redundant repoSelected computation (render.ts:577)
shouze added a commit that referenced this pull request Aug 23, 2026
Apply fixes for determinism, redundant computation, and UX documentation:

**scroll-cooldown.ts + scroll-cooldown.test.ts** — Fix non-deterministic test
- recordScroll() now accepts optional \`now\` parameter (default: Date.now())
- Tests pass explicit timestamp instead of relying on live clock
- Eliminates race condition where Date.now() advances between test capture
  and function call, causing flaky assertions

**render.ts** — Remove redundant repoSelected recomputation
- Use group.repoSelected directly instead of recomputing from extractSelected
- Comment clarifies that repoSelected is kept in sync by selection logic
  in tui.ts and render/selection.ts, removing per-frame overhead

**docs/architecture/components.md** — Clarify double-click detection ownership
- Update mouse hit-test component description: remove claim that hitTestClick()
  handles double-click detection (it doesn't — only maps coordinates to row+zone)
- Add note: double-click detection is implemented in tui.ts via timestamp tracking

**src/tui.ts** — Document mouse click semantics
- Add explicit comment explaining single-click (navigate) vs double-click (action)
- Reference docs/usage/interactive-mode.md § Mouse support for UX spec
- Clarifies this is a UX feature complementing keyboard shortcuts

Fixes Copilot review issues:
- #1: Deterministic test (scroll-cooldown.test.ts:22)
- #2: Accept 'now' parameter (scroll-cooldown.ts:26)
- #3: Document click semantics (tui.ts:391)
- #4: Clarify hit-test responsibility (components.md:115)
- #5: Remove redundant repoSelected computation (render.ts:577)
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