Skip to content

Conversation

@timothyfroehlich
Copy link
Owner

…ed games

  • Remove "Unplayable Machines" section (cluttered, low value)
  • Add "Newest Games" row showing 3 most recently added machines
  • Add "Recently Fixed Games" row showing machines that went from major/unplayable issues to none, ordered by when last fixed
  • Reorder layout: Quick Stats → Newest → Fixed → Assigned to Me → Recent Issues
  • Update Issues Assigned to Me to use full-width grid layout

…ed games

- Remove "Unplayable Machines" section (cluttered, low value)
- Add "Newest Games" row showing 3 most recently added machines
- Add "Recently Fixed Games" row showing machines that went from
  major/unplayable issues to none, ordered by when last fixed
- Reorder layout: Quick Stats → Newest → Fixed → Assigned to Me → Recent Issues
- Update Issues Assigned to Me to use full-width grid layout

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings January 28, 2026 03:56
@vercel
Copy link

vercel bot commented Jan 28, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
pin-point Ready Ready Preview, Comment Jan 28, 2026 4:52am

Copy link
Contributor

Copilot AI left a comment

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 improves the dashboard by replacing the low-value "Unplayable Machines" section with two more useful features: "Newest Games" (showing the 3 most recently added machines) and "Recently Fixed Games" (showing machines that have been repaired from major/unplayable issues). The sections have been reordered for better information hierarchy, and the "Issues Assigned to Me" section now uses a full-width grid layout for improved readability.

Changes:

  • Replaced "Unplayable Machines" query with "Newest Machines" (3 most recent) and "Recently Fixed Machines" queries
  • Added complex SQL logic to identify machines that had major/unplayable issues but are now fully operational
  • Reordered dashboard sections: Quick Stats → Newest Games → Recently Fixed Games → Assigned to Me → Recent Issues
  • Updated "Issues Assigned to Me" to use full-width (lg:col-span-3) with 2-column grid layout instead of single column

Comment on lines 423 to 435
<Card className="border-green-500/30 bg-green-500/10 hover:border-green-500 transition-all cursor-pointer h-full">
<CardHeader>
<div className="flex items-start justify-between gap-2">
<div className="flex-1">
<CardTitle className="text-base text-green-400 mb-1">
{machine.name}
</CardTitle>
<p className="text-xs text-green-400/80">
Fixed{" "}
{new Date(machine.fixedAt).toLocaleDateString()}
</p>
</div>
<CheckCircle2 className="size-5 text-green-400" />
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

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

The "Recently Fixed Games" section uses hardcoded green colors (green-500/30, green-500/10, green-500, green-400, green-400/80) instead of semantic color tokens defined in globals.css. According to the UI Guide's "No-Cruft" rule (docs/UI_GUIDE.md line 25), hardcoded colors should be avoided.

The codebase defines semantic success tokens in globals.css that should be used instead:

  • Use border-success/30 instead of border-green-500/30
  • Use bg-success/10 instead of bg-green-500/10
  • Use hover:border-success instead of hover:border-green-500
  • Use text-success instead of text-green-400
  • Use text-success/80 instead of text-green-400/80

This ensures consistency with the Material Design 3 color system and makes the theme easier to maintain. Note that a glow-success utility is not currently defined in globals.css, but following the pattern of existing glow utilities (glow-primary, glow-secondary, glow-destructive, glow-warning), one should be added if the glow effect is desired for this section.

Copilot generated this review using guidance from repository custom instructions.
Copy link
Owner Author

Choose a reason for hiding this comment

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

@copilot open a new pull request to apply changes based on this feedback

Copy link
Contributor

Copilot AI commented Jan 28, 2026

@timothyfroehlich I've opened a new pull request, #869, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits January 27, 2026 22:25
…ard (#869)

* Initial plan

* fix(dashboard): replace hardcoded green colors with semantic success tokens

Co-authored-by: timothyfroehlich <5819722+timothyfroehlich@users.noreply.github.com>

* feat(dashboard): add glow-success effect to Recently Fixed Games cards

Co-authored-by: timothyfroehlich <5819722+timothyfroehlich@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: timothyfroehlich <5819722+timothyfroehlich@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment on lines +148 to +182
const recentlyFixedMachinesPromise = db
.select({
id: machines.id,
name: machines.name,
initials: machines.initials,
unplayableIssuesCount: sql<number>`count(*)::int`,
fixedAt: sql<Date>`max(${issues.updatedAt})`.as("fixed_at"),
})
.from(machines)
.innerJoin(issues, eq(issues.machineInitials, machines.initials))
.where(
and(
eq(issues.severity, "unplayable"),
notInArray(issues.status, [...CLOSED_STATUSES])
// Issue was major or unplayable
inArray(issues.severity, ["major", "unplayable"]),
// Issue is now closed
inArray(issues.status, [...CLOSED_STATUSES]),
// Machine has NO open major/unplayable issues currently
not(
exists(
db
.select({ one: sql`1` })
.from(issues)
.where(
and(
eq(issues.machineInitials, machines.initials),
inArray(issues.severity, ["major", "unplayable"]),
notInArray(issues.status, [...CLOSED_STATUSES])
)
)
)
)
)
)
.groupBy(machines.id, machines.name, machines.initials);
.groupBy(machines.id, machines.name, machines.initials)
.orderBy(sql`max(${issues.updatedAt}) DESC`)
.limit(3);
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

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

The integration test file includes a test for "Unplayable Machines Query" (line 166-243) which tests functionality that has been removed in this PR. This test should either be removed or updated to test the new "Recently Fixed Games" query instead, as the old unplayable machines query no longer exists in the dashboard.

Copilot uses AI. Check for mistakes.
Comment on lines +133 to +143
// Query 4: Newest machines (3 most recently added)
const newestMachinesPromise = db.query.machines.findMany({
orderBy: desc(machines.createdAt),
limit: 3,
columns: {
id: true,
name: true,
initials: true,
createdAt: true,
},
});
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

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

The "Newest Games" section lacks integration test coverage. Consider adding a test similar to the other dashboard queries to verify that it correctly returns the 3 most recently added machines ordered by createdAt.

Copilot uses AI. Check for mistakes.
@timothyfroehlich
Copy link
Owner Author

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

…tions

Replace "Unplayable Machines" section checks with new sections:
- Newest Games: verifies heading and machines list or empty state
- Recently Fixed Games: verifies heading and fixed machines list or empty state

Fixes E2E test failures after dashboard refactor in 45baccd.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…tly fixed

Addresses Copilot review feedback:
- Remove obsolete "Unplayable Machines Query" test
- Add "Newest Machines Query" test (verifies 3 most recent by createdAt)
- Add "Recently Fixed Machines Query" test (verifies complex SQL logic for machines that had major/unplayable issues but are now fully operational)

Tests follow dashboard query patterns and include edge cases.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

await db.insert(issues).values(
createTestIssue(machine4.initials, {
issueNumber: 1,
severity: "playable",
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

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

Invalid severity value "playable" used in test. The valid severity values are "cosmetic", "minor", "major", and "unplayable" as defined in the database schema (src/server/db/schema.ts:145). This test will fail because the database will reject this invalid enum value. Change "playable" to a valid severity value such as "minor" or "cosmetic".

Suggested change
severity: "playable",
severity: "minor",

Copilot uses AI. Check for mistakes.
const [machine1, machine2, machine3] = await db
// Create 5 machines with staggered creation times
const now = Date.now();
const machinesData = await db
Copy link

Copilot AI Jan 28, 2026

Choose a reason for hiding this comment

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

Unused variable machinesData.

Suggested change
const machinesData = await db
await db

Copilot uses AI. Check for mistakes.
@timothyfroehlich timothyfroehlich merged commit d4c0995 into main Jan 28, 2026
23 checks passed
@timothyfroehlich timothyfroehlich deleted the feature/dashboard-recent-games branch January 28, 2026 04:57
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