Skip to content

feat: add agent timesheet access - #12

Merged
ECWireless merged 3 commits into
mainfrom
feat/agent-access-dashboard
Jul 23, 2026
Merged

feat: add agent timesheet access#12
ECWireless merged 3 commits into
mainfrom
feat/agent-access-dashboard

Conversation

@ECWireless

Copy link
Copy Markdown
Owner

Summary

  • generate a deployment-specific Codex timekeeping skill and one-paste setup prompt
  • add a selected-node dashboard flow for creating, rotating, and revoking scoped agent API keys
  • keep API access constrained to the selected subtree, with one-time secret display and verification guidance
  • improve agent-access and timer button layout, and clarify that the setup prompt only needs to be used once per harness

Why

This lets Codex and other agents record each working session as a TimeTree node and continuously add timer entries, without granting access to parent or sibling nodes.

Verification

  • pnpm lint
  • pnpm typecheck
  • pnpm test
  • pnpm test:integration
  • pnpm db:check
  • pnpm build
  • focused setup-generation unit suite: 8 passed
  • focused agent-access E2E suite: 8 passed across desktop and mobile
  • focused start/stop timer E2E suite: 2 passed across desktop and mobile
  • full E2E suite before the final copy/layout-only refinements: 44 passed, 2 skipped; all affected focused tests were rerun afterward
  • desktop and mobile secret-safe manual QA
  • final live verification using an isolated generated harness/repository: scoped tree read, session-node creation, timer start/stop entry, outside-subtree denial, and revoked-key rejection all passed
  • independent integrated review and focused post-QA review completed cleanly

Security boundary

The generated credential can read and mutate only its selected node and descendants. Ancestors and sibling subtrees remain inaccessible, secrets are displayed only at creation/rotation time, and revoked credentials are rejected.

@vercel

vercel Bot commented Jul 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
timetree Ready Ready Preview, Comment Jul 23, 2026 6:52pm

Request Review

@ECWireless
ECWireless marked this pull request as ready for review July 23, 2026 18:28
Copilot AI review requested due to automatic review settings July 23, 2026 18:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a scoped “agent access” flow so Codex (and similar agents) can record session nodes and timer intervals via a dedicated Agent API key that is limited to the selected node’s subtree, plus deployment-specific harness setup prompts to install the Codex skill safely.

Changes:

  • Introduces TimeTree Codex skill/setup prompt generation with strict origin + time zone validation and non-mutating connection verification guidance.
  • Adds a dashboard “Agent access” section and modal dialog to create/rotate/revoke subtree-scoped Agent API keys with one-time secret display.
  • Expands unit/E2E coverage for harness-origin normalization, prompt generation, and the end-to-end agent-access UI flows (including layout checks).

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/unit/agent-setup.test.ts Unit tests for origin normalization/mismatch handling and Codex setup prompt/skill generation.
tests/e2e/foundation.spec.ts Adds a layout assertion helper and applies it to timer control buttons.
tests/e2e/agent-access.spec.ts New E2E suite covering create/rotate/revoke flows, clipboard fallback, and dialog layout constraints.
src/lib/server/agent-setup.ts Server-only helper to derive canonical origin from env for harness setup gating.
src/lib/agent/setup.ts Origin security rules + Codex skill/installation/verification prompt generation.
src/components/node-dialogs.tsx Exports DialogFrame and adds optional className for reusable modal styling.
src/components/icons.tsx Adds Key and Copy icons used by the agent access UI.
src/components/dashboard-shell.tsx Adds “Agent access” summary section, refresh handling, and dialog integration for the selected node.
src/components/agent-access-dialog.tsx New agent access dialog UI with one-time secret display and key management actions.
src/app/page.tsx Fetches initial agent key metadata + canonical origin server-side when a node is selected.
src/app/globals.css Styles agent access summary/dialog and updates disabled/aria-disabled button styling.
SPEC.md Updates spec to remove local-storage “acknowledgement” persistence for harness setup.

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

Comment thread src/components/agent-access-dialog.tsx
@ECWireless
ECWireless merged commit 9bd2293 into main Jul 23, 2026
3 checks passed
@ECWireless
ECWireless deleted the feat/agent-access-dashboard branch July 23, 2026 18:55
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