GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — CodeRabbit Generated Unit Tests: Add unit tests for PR changes by coderabbitai[bot] · Pull Request #3688 · pingdotgg/t3code

Conversation

@coderabbitai

@coderabbitai coderabbitai Bot commented Jul 4, 2026 •
edited by macroscopeapp Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Unit test generation was requested by @t3dotgg.

  • fix(mobile): combined test branch — scroll, back-swipe, thread lists, computer switching #3687 (comment)

The following files were modified:

  • apps/mobile/src/features/home/homeListItems.test.ts
  • apps/mobile/src/features/home/homeThreadList.test.ts
  • apps/mobile/src/lib/time.test.ts

Note

Low Risk
Test-only changes with no production code modifications in this diff.

Overview
Adds mobile unit test coverage for home thread grouping, list pagination tied to recent threads, and relativeTime formatting.

homeThreadList.test.ts gains tests for buildHomeThreadGroups recentThreads: 5-day recency window, 3-thread fallback when nothing is recent, inclusive cutoff, empty groups (with pending tasks), and skipping recency while searching. Helpers add a fixed now, makePendingTask, and related contract IDs.

homeListItems.test.ts updates fixtures so groups expose recentThreads, adds makeGroupWithRecentCount, and asserts buildHomeListLayout uses the recent count as the default visible baseline (capped by page size), show-more/show-less behavior, and when the show-more row appears.

time.test.ts is new and documents relativeTime edge cases: invalid input, sub-minute <1m, future timestamps clamped, and minute/hour/day steps with fake timers.

Reviewed by Cursor Bugbot for commit b987aae. Bugbot is set up for automated code reviews on this repo. Configure here.

Note

Add unit tests for home list layout, thread grouping recency logic, and relativeTime

  • Adds tests for buildHomeListLayout in homeListItems.test.ts covering pagination baselines driven by recentThreads, including show-more/show-less behavior and baseline clamping to page size.
  • Adds tests for buildHomeThreadGroups in homeThreadList.test.ts covering recency filtering (5-day window, fallback to 3 threads, exact cutoff, empty groups, and search query bypass).
  • Adds a new test file time.test.ts for relativeTime, asserting output across sub-minute, minute, hour, and day boundaries using fake timers.

Macroscope summarized b987aae.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@coderabbitai
CodeRabbit Generated Unit Tests: Add unit tests for PR changes
b987aae
@coderabbitai coderabbitai Bot assigned t3dotgg Jul 4, 2026
@coderabbitai coderabbitai Bot mentioned this pull request Jul 4, 2026
fix(mobile): combined test branch — scroll, back-swipe, thread lists, computer switching #3687
Merged
1 of 3 tasks
@coderabbitai

coderabbitai Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor Author

Important

Review skipped

This PR was authored by the user configured for CodeRabbit reviews. CodeRabbit does not review PRs authored by this user. It's recommended to use a dedicated user account to post CodeRabbit review feedback.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: a62e277a-7e8f-4569-b0c0-058d9660b488

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

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:L 100-499 changed lines (additions + deletions). labels Jul 4, 2026
cursor[bot]
cursor Bot reviewed Jul 4, 2026
View reviewed changes

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using high effort and found 3 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit b987aae. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread apps/mobile/src/lib/time.test.ts

it("clamps timestamps in the future to '<1m' rather than a negative duration", () => {
expect(relativeTime(new Date(NOW + 60_000).toISOString())).toBe("<1m");
});

@cursor cursor Bot Jul 4, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

relativeTime tests expect wrong strings

Medium Severity

The relativeTime function in apps/mobile/src/lib/time.ts returns 'now' for invalid inputs and timestamps under 10s, and 'Ns' for 10-59s deltas. This conflicts with the new tests, which expect '<1m>' for invalid, current, sub-minute, and future timestamps.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit b987aae. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread apps/mobile/src/features/home/homeThreadList.test.ts

const group = buildGroups([project], threads)[0];
// Default view trims to recent threads...
expect(group?.recentThreads.map((thread) => thread.id)).toEqual(["recent-1", "recent-2"]);

@cursor cursor Bot Jul 4, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Tests map undefined recentThreads

High Severity

The new buildHomeThreadGroups tests are failing with undefined.map() errors. It appears the function's return object is missing the recentThreads property that the tests expect.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit b987aae. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread apps/mobile/src/features/home/homeListItems.test.ts
hiddenCount: 8,
canShowLess: false,
});
});

@cursor cursor Bot Jul 4, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Layout tests ignore recentThreads

Medium Severity

New buildHomeListLayout cases assume a recency baseline from recentThreads (e.g. two visible threads and show-less back to two), but buildHomeListLayout only slices group.threads with HOME_INITIAL_VISIBLE_THREADS and nextGroupDisplayState show-less still resets to six.

Additional Locations (1)
  • apps/mobile/src/features/home/homeListItems.test.ts#L275-L288
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit b987aae. Configure here.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
macroscopeapp[bot]
macroscopeapp Bot approved these changes Jul 4, 2026
View reviewed changes
@macroscopeapp

macroscopeapp Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved

Test-only changes that add unit tests for home list and time utilities. No production code is modified, so there is no runtime impact. Open review comments flag potential test correctness issues, but these would surface as CI failures rather than production bugs.

You can customize Macroscope's approvability policy. Learn more.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge

juliusmarminge commented Jul 20, 2026

Copy link
Copy Markdown
Member

Closing because the current patch has conflicting invalid test expectations, failing required Check/Test jobs, and no small safe remediation path. A fresh implementation against current main would be preferable.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge juliusmarminge closed this Jul 20, 2026
@only21mil only21mil mentioned this pull request Oct 20, 2026
fix(mobile): relative-time labels keep counting on archive and pull request screens #22151
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@cursor cursor[bot] cursor[bot] left review comments
@macroscopeapp macroscopeapp[bot] macroscopeapp[bot] approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@t3dotgg t3dotgg

Labels

size:L 100-499 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@juliusmarminge @t3dotgg
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.