Skip to content

Comments

v0.0.9: adapter package, time stats, doctor command#7

Merged
butttons merged 9 commits intomainfrom
feat/v0.0.9
Feb 23, 2026
Merged

v0.0.9: adapter package, time stats, doctor command#7
butttons merged 9 commits intomainfrom
feat/v0.0.9

Conversation

@butttons
Copy link
Owner

Summary

Extract shared agent code into @residue/adapter, add time-based analytics to the dashboard, and introduce residue doctor for fixing orphaned sessions.

Changes

@residue/adapter (new internal package)

  • Extract agent mappers, search text extractors, and metadata extractors from CLI and worker into shared @residue/adapter package
  • Add extractTimestamps() utility that derives first/last message timestamps from any agent's raw session data

@residue/cli

  • Add residue doctor command to retroactively link orphaned sessions to recent commits
  • Send first/last message timestamps during sync for accurate duration tracking

@residue/worker

  • Add time stats cards (total hours, avg/median/longest duration) to all dashboard pages
  • Add hour-of-day vertical bar chart with morning/afternoon/evening/night bands
  • Add day-of-week horizontal bar chart
  • Add daily activity line chart to repo page
  • Add migration 0007 for first_message_at/last_message_at columns on sessions
  • Use message timestamps for duration calculations with wall-clock fallback

Docs

  • Update AGENTS.md and CONTRIBUTING.md for the adapter package structure

- Add useLineChartLayout hook with daily granularity, gap-fill, and 180-day cap
- Add Path SVG primitive with fillOpacity support
- Fix gridTicks to ceil to next step instead of appending raw max
- Add time-of-day, day-of-week charts and stats cards to dashboard
- Track first/last message timestamps for active duration (migration 0007)
- Fall back to wall-clock duration for sessions without message timestamps
@butttons butttons merged commit 178d901 into main Feb 23, 2026
2 checks passed
@butttons butttons deleted the feat/v0.0.9 branch February 23, 2026 03:32
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.

1 participant