← All docs

Team Accomplishments

Per-person task completion feed with session telemetry and result links
2026-05-24 Build plan ~2–3 week build Touches: Supabase · Sessions Worker · Tasks · WorkLogs

How to read this doc

Start with Context for the problem, then jump to Page design for the concrete UI spec. The Merged work-time algorithm section covers the overlap-dedup logic. Implementation phases has the build sequence. Markdown source: docs/devtasks/team-accomplishments.md.

Contents

  1. Context
  2. Data model changes
  3. Merged work-time algorithm
  4. Page design
  5. Completion modal enhancement
  6. Implementation phases
  7. Build journal

1. Context

Sponic tracks work across several disconnected surfaces: Tasks (completion notes, activity log), DevControl Sessions (Claude session telemetry), and WorkLogs (associate time entries). When a manager asks “what did Sonia do today?” or “what did the team ship this week?”, the answer requires cross-referencing three different pages and mentally stitching the timeline together.

The task_session_links table already connects tasks to sessions, and the completion modal captures a summary note and linked sessions at done-time. The missing piece is a read-only dashboard that assembles this data into a per-person accomplishment feed.

Goal

A single page where you can see, for any team member in any time range:

  1. Total merged work time — wall-clock, overlap-deduplicated across all sessions.
  2. Logged hours from WorkLogs (for associates who clock in/out), shown alongside session time for comparison.
  3. Every completed task with: completion note, linked sessions (with individual durations), result URL, and link to the task itself.

2. Data model changes

2.1 New field: result_url on tasks

Add a nullable result_url TEXT column to public.tasks. Holds a link to the deliverable — a deployed page, a PR, a doc, a design file. Set at completion time or edited later.

ALTER TABLE public.tasks ADD COLUMN result_url TEXT;

2.2 No new tables

Everything else already exists:

Table What it provides
tasks completed_at, completed_by, title, status, result_url
task_activity action=‘completed’ entries with the completion note in comment
task_session_links task_id + session_id + linked_at
time_entries associate_id, clock_in, clock_out, duration_minutes
associate_profiles app_user_id, hourly_rate
Sessions API /sessions/:id → started_at, duration_mins, title, summary

3. Merged work-time algorithm

Session time for a person must not double-count overlapping sessions. The algorithm:

  1. Gather all sessions linked to any completed task for a person in the selected time range.
  2. Convert each session to an interval: [started_at, started_at + duration_mins].
  3. Sort intervals by start time.
  4. Merge overlapping/adjacent intervals: walk the sorted list, extend the current interval if the next one overlaps, otherwise close it and start a new one.
  5. Sum the durations of all merged intervals.

This runs at render time in the browser. No stored aggregation.

Cross-task overlap rule

If two sessions overlap but are linked to different tasks, the overlapping time is counted once in the person’s total. Individual session durations displayed per-task remain their raw values (factual telemetry), but the person-level total is always the merged wall-clock span.

4. Page design

4.1 Location

New page at /en/accomplishments (top-level nav item between “Work Summaries” and “DevControl”). Alternatively, a new tab under Tasks called “Accomplishments” — decision at build time based on nav density.

4.2 Filters

4.3 Layout

Each person gets a card showing their merged session time, optional logged hours, and a list of completed tasks:

Sonia Wendorff Session time: 3h 12m (merged) Logged hours: — ————————————————————————— [done] #71 Finalize Warsaw housing May 24, 3:15pm “Signed lease, uploaded scan” [View result] Sessions: session-abc (47m) · session-def (22m) [done] #68 Fix email routing config May 24, 1:00pm “Updated Cloudflare DNS records” [View result] Sessions: session-ghi (12m)

For associates with WorkLogs entries (e.g. Mariia), the card also shows logged hours alongside session time, enabling comparison.

4.4 Task row details

Each completed task row shows:

5. Completion modal enhancement

The completion modal (shown when marking a task “done”) already collects a note and session links. Add a result_url input field:

6. Implementation phases

Phase 1 — Schema + result_url field

Phase 2 — Accomplishments data layer

Phase 3 — Accomplishments page (read-only)

Phase 4 — WorkLogs comparison

Phase 5 — Polish + linking

Build journal

No entries yet — appended by /feature, /journal, and /wrap.