Skip to content

Show Active Ticket on Clock Page - #506

Open
SarkarShubhdeep wants to merge 2 commits into
mainfrom
fix/414-ticket-not-on-clock
Open

Show Active Ticket on Clock Page#506
SarkarShubhdeep wants to merge 2 commits into
mainfrom
fix/414-ticket-not-on-clock

Conversation

@SarkarShubhdeep

Copy link
Copy Markdown
Collaborator

Summary

Fixes #414: the clock status card did not show which ticket was running.

Changes (ClockPage only):

  • When clocked in with a running ticket timer, show a clickable ticket badge (icon + title) that opens /app/tickets/:id
  • When clocked in with no ticket and the team requires a plan, show “Plan required for this team”
  • Live updates via timerApi.getToday() + DDP timers.liveForUser

Test plan

  • Clock in with no ticket on a plan-required team → plan badge shows
  • Start a ticket timer → badge switches to ticket title (with ticket icon)
  • Click badge → ticket detail page
  • Stop ticket timer → plan badge returns (if plan required)
  • Long title truncates on mobile; Break button / timer unchanged

Made with Cursor

When clocked in, display a clickable ticket badge if a timer is running;
otherwise keep the plan-required badge. Updates live via DDP.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copilot AI balanced review requested due to automatic review settings August 26, 2026 16:10

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

Adds active-ticket visibility to the clock status card.

Changes:

  • Fetches and live-updates the running ticket.
  • Displays a clickable, truncated ticket badge.
  • Shows the plan-required badge when no ticket runs.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/features/clock/ClockPage.tsx Outdated
Comment on lines +99 to +113
const dayEntries = await timerApi.getToday();
const running = dayEntries.flatMap((de) => de.sessions).find((t) => !t.endTime);
if (!running) {
setRunningTicket(null);
return;
}
const dayEntry = dayEntries.find((de) => de.sessions.some((t) => t.id === running.id));
if (!dayEntry?.entry.ticketId) {
setRunningTicket(null);
return;
}
setRunningTicket({
id: dayEntry.entry.ticketId,
title: dayEntry.entry.displayTitle || dayEntry.entry.ticketId,
});
@github-actions

github-actions Bot commented Aug 26, 2026

Copy link
Copy Markdown

🚀 Preview Deployment Ready

Service URL
App https://mieweb-timehuddle-fix-414-ticket-not-on-clock.os.mieweb.org
API (Meteor) https://mieweb-timehuddle-fix-414-ticket-not-on-clock-api.os.mieweb.org

Preview auto-deletes when this PR is closed.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@SarkarShubhdeep SarkarShubhdeep self-assigned this Aug 26, 2026
@SarkarShubhdeep SarkarShubhdeep added the enhancement New feature or request label Aug 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Ticket is not on the clock

2 participants