Dashboard project activity

Dashboard opens a mosaic of activity cards. a opens activity and e opens Attention; neither needs to load a complete event or session history. The same React components render in the TUI, browser and desktop app.

Each verified GitHub organization gets one card for its connected repositories. Repositories owned by personal GitHub accounts get separate cards. GitHub's public owner profile API supplies the actual owner type; names and group slugs do not establish it. Unknown owners and other Git providers stay separate. Cards never combine different devctrl users' data.

Cards are ordered by the selected metric’s latest recorded activity, newest first. They show the exact UTC date/time and elapsed time, agent CLIs used, native token totals, non-merge commits, and added/deleted lines. Periods are today, the last 7 UTC calendar days, and the last 30 UTC calendar days, including today. They are not rolling 24-hour windows. A 91-day contribution graph can display tokens (t) or commits (c). Last tokens shows the latest recorded native token activity; Last commit shows the latest reachable Git commit. Switching metrics changes both the timestamp and sorting. Session starts, status changes and polling do not count as token consumption or commits.

Token totals use k for thousands and m for millions (1.2m, rather than 1200.0k). Unfilled graph cells consistently use · for no recorded activity; green squares show increasing activity. An unfilled cell does not establish zero when coverage is incomplete. The card explicitly labels complete, incomplete or unavailable history. ≥ identifies a recorded lower bound; — means unavailable. Complete Git counts stay complete while refreshing, and a failed token scan does not make an otherwise complete Git scan partial.

Projects without a Git checkout still collect native Claude/Codex token history. The card labels them Workspace · no Git repository and leaves commits and line deltas unavailable. Git and native usage collection are independent: a failure in one cannot discard the other. Each graph also shows its recorded 91-day total, so older work remains visible even when it falls outside Today, 7d and 30d. A dash in those shorter periods means no reliable total is available for that period; it does not erase recorded older usage or establish zero. Native histories remain scoped to exact owned accounts, workspace state and provider session IDs.

Dashboard visibility

Select a card and press h (Hide) to remove its projects/repositories from your Dashboard. Press v or choose Hidden to see hidden cards, then h (Restore) to show them again. An organization card hides/restores all repositories currently included in that card. Press Enter or choose Repositories to open that organization’s individual repositories and hide/restore only the selected one. Escape returns to the organization overview. Hidden repositories are excluded from visible organization totals and counted only in Hidden; they still collect activity normally. This never stops a session, removes a project, or changes Projects visibility.

Preferences persist on the controller per signed-in user and work across TUI, browser and desktop. Operator preferences do not change another user’s Dashboard. PUT /v1/dashboard/activity/visibility accepts {projectIds, hidden} only after checking every project’s ownership; mixed authorized/unauthorized batches change nothing. Operator MCP can discover and call the same operation. Session MCP get_project_activity remains a read-only view of its own repository, independent of Dashboard visibility.

With content focus, arrows select cards and Page Up/Down moves through the visible mosaic. n and p load older/newer pages; r checks cached summaries again. Escape returns to Attention from the overview. Tab moves focus to the navigation without changing the activity view or selected metric. The legend and action bar stay at the bottom of the content area while cards scroll independently. Web cards scroll; small terminals explicitly request more height rather than silently hiding a card.

Collection and freshness

GET /v1/dashboard/activity?limit=12&cursor=0&metric=tokens&view=visible returns authenticated, user-scoped summaries, at most 24 cards per page. metric=tokens|commits controls Last and ordering; view=visible|hidden filters saved visibility. group=<organization-card-id> opens its individual repository cards. Counts report visible and hidden repositories within the selected scope. It immediately returns saved data and queues at most two read-only scans. Each repository is scanned at most once every five minutes while Dashboard is open. The host executes accepted scans even if the interface disconnects. No provider session or Project container is restarted.

Execution hosts poll a narrow, authenticated activity-command queue every two seconds, independently of Docker inventory and storage reconciliation. The poller uses the existing authority fencing and command dispatcher; a poll, WebSocket message and general queue cannot run the same command twice. Before reading a checkout, the host rechecks its exact current command and workspace. The controller also rejects late snapshot writes after cancellation, deletion, relocation, ownership changes or a changed checkout path. At most two activity scans are admitted globally, with one scan executing at a time on each host. Other command types, including urgent stops, keep their independent dispatch. No terminal or browser needs to stay connected.

The host reduces Git records to at most 91 daily rows before sending them to the controller. SQLite stores compact per-repository snapshots separately from /v1/state. The interface polls this small endpoint every five seconds, cancels requests and timers on exit, and updates relative times once per minute. Offline hosts retain their last snapshot with partial coverage after five minutes; missing data remains unavailable. An offline queued scan does not keep a spinner running indefinitely.

The session MCP tool get_project_activity reads only the current repository's cached card. It does not reveal sibling repositories from its organization or start a separate scan. There are no caller-supplied project selectors.

Counting rules and limitations

Owner metadata is checked asynchronously by the optional GitHub provider package. The public account endpoint identifies personal and organization accounts without requiring access to a private repository. Successful lookups are cached for a day; unavailable metadata retries after an hour. A private repository can use only its immutable owner's Git credential, preferring the account explicitly bound to that repository. Public metadata can be read without a credential. Existing user and session access boundaries apply to every API and MCP read.

Browser regression check

After building the TUI/web bundle, run the opt-in node apps/tui/web/dashboard-activity.browser.integration.mjs with Playwright installed. DEVCTL_PLAYWRIGHT_MODULE and DEVCTL_BROWSER_EXECUTABLE can point to an existing installation. It uses an isolated fixture, tests desktop/mobile hide and restore, metric-specific Last, fixed footer geometry and Attention navigation, and writes screenshots to a temporary directory. No paid accounts are required.

A terminal renders only the cards that fit. The range indicator shows the visible window within the loaded page; arrows, Page Up/Page Down and the mouse wheel reach the remaining cards. Newer/Older navigate API pages. Browser/app render all loaded cards in a scrollable grid. Compact terminal cards retain the metric table and seven-day calendar rows. Doctor uses a compact summary so it does not displace the activity view. See Deployment map for placement views.