Repository navigation
feat(time): list the hours to log as attention items - #157
Merged
Merged
Conversation
The time service now answers the attention contract, so the Home's "Needs you" lists each weekday of the last 7 days with nothing logged on Jira, today's included until anything is logged, due at 17:00 on its day in the service's zone (decision 188). The items come from the same poller as the time report and the week, so the three agree, and one read of Jira serves them all.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Brief
Goal. The Home's "Needs you today" tells me to log my hours. The time service answers the attention contract (decision 158) with an item for each weekday of the time report with nothing logged on Jira, today's included, so a missing day and today's hours show among the things that need me, and the Home marks a missing day late. Home already asks time for its items and the app already links them to the Time page, so neither changes.
Scope.
report: each day says, unseen in the JSON, whether it's a weekday with nothing logged, today included (Unlogged); a missing day is such a day before today, as before.services/time/internal/attention, with the lister of the items, besideweek.main.go: time serves the attention contract on the same server as the time contract.Out of scope.
process-compose.yaml), and the app links atimeitem to/time.worklog-addandfill-daybring the writing, on the Time page.Acceptance criteria.
ListItemslists an item for each weekday of the report with nothing logged, today's included, in the report's order, the earliest first:2026-10-29, which home makestime/2026-10-29;ListItemslists nothing.ListItemsfails withUNAVAILABLE, "no read of the worklogs on Jira has succeeded yet", asGetWeekdoes; after a read that fails, it lists the items of the latest read to succeed.GET /time/reportanswers as before.mise run checkpasses.QA
jira.goand inroutes. The tests run in the process's zone, CI's is UTC, and the stand-in Jira logs away from midnight, so a report made in UTC matches one made in the local zone there. The worklogs package's own tests pin that the poller follows the zone it's given, androutesnames the zone once. §0 has the idea thatroutescould take the zone.TestTimeReadsTheWorklogsOnceForItsReportWeekAndItems, withcountedJira. The report, the week and the items come from one poller, so one read of Jira serves all three. It catches a lister with a poller of its own, and a report with one.ListItemsis called withbuf curlover gRPC on h2c and over the Connect protocol, and home'sGET /homeis read with time as its only peer.time/<date>, its title and detail, and Jira as its source. Each is due at 17:00 local, across the clock change on 25 October: 15:00Z on the Friday, 16:00Z after. At 18:33 every item is late, today's included.unavailable, with the reason. Home marks time unavailable and logslist the itemspeer=time.deadline_exceeded.TZ=America/Los_Angeles: Los Angeles's days, due at 17:00 there. At 10:33 there, today's item isn't late, and the missing days are.GET /time/report: unchanged, withdate,loggedHoursandmissing, and nounlogged. Its missing days are the items before today.mise run checkis green.attention.Review
No blocking findings. Non-blocking:
weekandattention. It's under dupl's 100 tokens. Sharing it would bring a connect error intoworklogs, or need a package of its own.itemfails only on a report date that isn't a date, whichreport.Newnever makes. The error is handled, and a test covers it with a stand-in report.Screenshots
The Home's "Needs you" with time's items. Home and the web are unchanged; these rows are new because time now lists them.
Merged under the user's standing OK (2026-10-26): merge once CI's
checkis green, and review everything at the end.