Skip to content

Add reporting managers who can approve their reports' time off - #113

Closed
shrey-CDZ wants to merge 1 commit into
asyncup-dev:mainfrom
shrey-CDZ:008-reporting-managers
Closed

shrey-CDZ wants to merge 1 commit into
asyncup-dev:mainfrom
shrey-CDZ:008-reporting-managers

Conversation

@shrey-CDZ

Copy link
Copy Markdown
Contributor

What & why

Under the approval time-off policy, a day-off request can only be decided by
workspace admins and the standup's managers. Often the right approver is a
person's line manager, who isn't a manager of that standup — and making them one
hands over the whole standup's configuration just to sign off leave. This adds a
per-team reporting manager, chosen from people who already manage somewhere,
who can approve their reports' days off without being made a manager of the
standup.

Changes

  • Database (migration 21, both dialects): reporting_manager and
    reporting_manager_name columns on participants — a per-(standup, person)
    attribute, like mandatory.
  • Core: the time-off request card also DMs the reporting manager, for day-off
    requests only; decide() authorises a reporting manager to decide their
    reports' day-off requests, even without managing the standup. First decision
    wins, unchanged.
  • API: reportingManager on PATCH …/participants/:userName and the
    participant payload (validated — must already be a manager, can't be yourself);
    new GET …/manager-candidates; GET /requests widened so a reporting manager
    sees their reports' pending day-off requests; approve/decline opened to them.
  • Web: a Reports to picker on each person's row in the standup's People
    view, from the managers pool.

How checked

  • bun run typecheck and bun run web:typecheck clean.
  • bun test — 544 pass, 0 fail. bun run web:test — 116 pass.
  • New tests/reporting-managers.test.ts with a test mapped to each acceptance
    criterion; 100% line/function coverage on every file this PR touches.
  • Drove the flow end to end on the fake adapter: a report files a day off, the
    request reaches a reporting manager who manages no standup, a bystander is
    refused, and approving (console and simulated Chat card-click) resolves it and
    marks the person away.

Spec

specs/008-reporting-managers.md

Notes for review

  • Figma: none yet — no access. The team-row picker was validated by local
    deploy. Per AGENTS.md this needs frames before merge; recorded as a
    deliberate deviation in the spec.
  • The spec is marked "approved for local build"; it still needs maintainer
    approval.
  • The repo-wide test:coverage 100%-line gate currently fails on a clean
    checkout too (the Bun version here flags some error branches across unrelated
    files). This PR keeps every touched file at 100% and nudges the overall number
    up.

Under the approval time-off policy, a day-off request could only be
decided by workspace admins and the standup's managers. This adds a
per-team reporting manager — set on the standup's People view — who can
approve their reports' days off without being made a manager of the
standup.

- participants gain reporting_manager columns (migration 21, both dialects)
- the time-off request card also DMs the reporting manager, days off only
- decide() authorises a reporting manager for their reports' days off
- GET /requests widens to include a caller's reports' pending requests
- web: a "Reports to" picker on each person's row, from the managers pool

Spec: specs/008-reporting-managers.md
@akumar-99

Copy link
Copy Markdown
Contributor

Thank you @shrey-CDZ for this. You spotted a real gap: under Needs approval, a person's line manager often isn't a manager of the standup, so they couldn't sign off leave. Your data model and approach are what shipped.

This is now in #114, built from spec 009 (specs/009-reporting-managers.md), which credits your proposal. The build commit lists you as co-author, so it will count as your contribution on main.

The main changes from the review:

  • A reporting manager can decide only days off, and only on a standup that needs approval, while they still manage a standup.
  • The reporting manager is set per standup, and adding someone back by hand clears it.
  • The requester's reply names the reporting manager.
  • The schema change is migration 22, with an index.

Closing this in favour of #114. Thanks again, and further contributions are very welcome.

@akumar-99 akumar-99 closed this Oct 28, 2026
akumar-99 added a commit that referenced this pull request Oct 28, 2026
Each person can have a reporting manager on a standup, picked from the people who manage a standup. On a standup that needs approval, their day-off requests also go to that reporting manager, who can approve or decline them in Chat, the web app or the API. Proposed in #113.

Co-authored-by: shrey-CDZ <279933707+shrey-CDZ@users.noreply.github.com>
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.

2 participants