feat(mentions): @-mention dates, times, and ranges

Merged
DA
1d ago
+1100-19

The developer asked to @-mention dates the way Notion does, including times and ranges, without overengineering how the date is stored.

What it does

Type a date after @ in the plan, the agent composer, or a plan comment: @today, @tomorrow 3pm, @next fri, @oct 30, @fri to mon, @tomorrow 3pm - 5pm. The @ list puts the date first under Dates. Each row shows the date relative to today and spells it out in full beside it. Picking it writes:

[@Oct 20, 2026, 3:00 PM PDT](luke://date/2026-10-20T15:00-07:00)
  • Stored like Notion's date. The target is a start and an optional end in ISO 8601, which mirrors Notion's {start, end}: a day (2026-10-20) or a time with its offset (2026-10-20T15:00-07:00). A range is luke://date/<start>/<end>. The luke:// prefix is the form this repo already uses for mentions with no web page (MCP servers), so dates needed no new parsing path and no migration.

  • Absolute words, relative chip. The written label is always the full date, so agents, GitHub and Slack read it correctly and it never goes stale. The chip shows it relative to the reader's own today and time zone: Today, Tomorrow 3:00 PM, Friday, Last Friday, Oct 30, and Friday → Oct 26 for a range. It updates every minute. Hovering shows the full date and how far off it is. Clicking opens nothing.

  • @dates: narrows the list to dates and offers Today, Tomorrow and next Monday. Dates also get a row under "Mention from".

  • Parser (packages/features/src/date-mention.ts): a short English grammar, with no new dependency. It reads:

    • named days, and weekdays with this, next or last
    • next week, next month
    • in N days/weeks/months, N days ago
    • a month and day, ISO dates, and US month/day
    • times (3pm, at 9:30am, 15:00, noon)
    • ranges joined by to, until, - or →

    A range's ends must both be days or both be times, and the end must come after the start. Zone and offset math uses Effect's DateTime.

  • Agents. A date mention passes no extra context to an agent, since its words are already the date. Coding agents are shown how to write a day, a time and a range. Luke (the brain) is told to write a day the developer names as a date mention.

Screenshots

Mockup built from the real @luke/ui components and the real date functions, with today set to Monday, Oct 19, 2026, Los Angeles:

Date rows in the @ list and date chips in a plan's words, light

The same, dark

Notes for review

  • A date is not offered as a bare @ suggestion; it appears once the words read as a date. To avoid hiding people's names, some words need a minimum length: tom is not read as tomorrow (tomo is), and a month name alone such as may is not read as a date.
  • next fri means Friday of next week (weeks start on Monday). Each row shows the full date next to it.
  • Luke only knows the current time in UTC, so near midnight his "Friday" can land on the wrong day. Passing the developer's time zone to the brain is left for later. For that reason Luke is only told to write days, not times.
  • packages/service/fixtures/coder-instructions/chat-off.json changes only by the new date line in the coding agent's mention examples. I regenerated it with a script that failed if anything else differed.

Checks run

pnpm check:affected ran out of memory in this 8 GB sandbox, so I ran its parts one at a time:

  • pnpm lint, pnpm knip and pnpm discarded-effect passed.
  • Typecheck passed for features, panel, service and web.
  • Vitest passed for features, service and panel (2,334 panel tests, 1,871 features + service tests).

Made with Luke


Devin Review