Skip to content

feat(toggl): add workspace user reporting - #57

Merged
jack-arturo merged 2 commits into
feat/self-host-streamable-httpfrom
feat/workspace-user-reporting-refresh
Jun 8, 2026
Merged

feat(toggl): add workspace user reporting#57
jack-arturo merged 2 commits into
feat/self-host-streamable-httpfrom
feat/workspace-user-reporting-refresh

Conversation

@jack-arturo

Copy link
Copy Markdown
Member

Summary

  • refreshes PR feat: workspace user listing and per-user report filtering #46 on top of the self-host HTTP foundation branch
  • adds privacy-safe toggl_list_workspace_users using documented GET /workspaces/{id}/users, returning only uid, name, and active
  • adds optional uid report filtering through Toggl Reports API v3 for daily, weekly, project summary, and workspace summary tools
  • keeps existing authenticated-user report behavior unchanged when uid is omitted
  • carries forward original contributor work with attribution to Vincent Ardern

Breaking Changes

None.

Related

Verification

  • npm run build
  • npm test
  • npm run test:coverage
  • npm run lint (exits 0 with existing no-explicit-any warnings)
  • npm audit --audit-level=high (exits 0; existing moderate brace-expansion advisory remains)

Co-authored-by: Vincent Ardern vincent@charityaccounts.co.nz

Refreshes PR #46 on top of feat/self-host-streamable-http.

Adds privacy-safe workspace user lookup and optional uid report filtering through Toggl Reports API v3.

Co-authored-by: Vincent Ardern <vincent@charityaccounts.co.nz>
Copilot AI review requested due to automatic review settings June 4, 2026 00:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds privacy-safe workspace member listing and enables optional per-user report filtering by uid via Toggl Reports API v3, while keeping existing “authenticated user” report behavior unchanged when uid is omitted.

Changes:

  • Introduces toggl_list_workspace_users (returns only uid, name, active) to support team reporting without leaking private fields.
  • Extends daily/weekly/project/workspace report tools with optional uid + workspace_id to fetch another member’s entries via Reports API v3.
  • Refactors Toggl API calls to share retry logic and adds/extends tests covering the new endpoints and pagination behavior.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/toggl-api.test.ts Expands TogglAPI unit coverage (workspace users, Reports API pagination, 5xx retries) and enhances the response mock to support custom headers.
tests/mcp-server.test.ts Adds MCP-level tests for the new tool schema and verifies privacy-safe output + report filtering behavior.
src/types.ts Adds WorkspaceUser (raw API shape) and WorkspaceMemberSummary (privacy-safe shape).
src/toggl-api.ts Adds workspace user fetch + mapping, Reports API request helper, and per-user time entry retrieval with pagination/flattening.
src/index.ts Adds new MCP tool definition and wires uid-based branching into report handlers.
server.json Registers the new toggl_list_workspace_users tool in the published tool list.
README.md Documents team reporting, the new tool, and uid filtering support across report tools.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/toggl-api.test.ts
Comment thread src/toggl-api.ts
Comment thread src/types.ts
@jack-arturo
jack-arturo merged commit 29d09b1 into feat/self-host-streamable-http Jun 8, 2026
2 checks passed
@jack-arturo
jack-arturo deleted the feat/workspace-user-reporting-refresh branch June 8, 2026 15:40
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.

3 participants