8000 feat(automations): the Approvals page, its badge, and Home's row by adeelahmad · Pull Request #459 · adeelahmad/lense · GitHub
[go: up one dir, main page]

Skip to content

feat(automations): the Approvals page, its badge, and Home's row - #459

Merged
adeelahmad merged 3 commits into
mainfrom
claude/project-thread-gfulp2
Oct 16, 2026
Merged

adeelahmad merged 3 commits into
mainfrom
claude/project-thread-gfulp2

Conversation

@adeelahmad
@adeelahmad adeelahmad commented Oct 16, 2026 •
Copy link
Copy Markdown
Owner

Requested by Adeel · project thread

Description

Before: approvals waited with nowhere to see them together. The link in the chat message (/approvals?id=12) led to no page, and nothing in the app said something was waiting.

After: workflow studio M8, part 5 of 5. The new Approvals page (/approvals, or ⌘K → Approvals) lists what waits for your pick: each automation's actions together, and the assistant's by conversation. Each card shows what it would do, why (a link to the activity that caused it), whether it reaches outside Lens, when it expires, and its params.

  • The first card is in focus, so Enter approves it and focus moves to the next. Tab moves between them.
  • Edit changes the params in place, keeping their types, and approves with the changes.
  • Always allow appears only where the node can be allowed.
  • Decline takes it out at once, with Undo on the notice for a few seconds instead of a confirm dialog. Leaving the page sends what was declined.
  • The link you were told brings that one first, or says what became of it if it was already decided. Below, what was decided lately.

While anything waits, a badge in the top bar counts it, the nav gets an Approvals item under Automate with the same count, and Home's Needs attention gets a row ("2 actions wait for your approval · from automations", Review). With nothing waiting none of them shows, so the nav stays as short as it was: an always-there item pushed People and Namespaces off a phone's screen, a swipe more in the clicks survey.

How: components/approvals/ holds the page, the card, the badge, a shared count query (useApprovalCount, read every minute) and pure helpers in model.ts, tested on their own. Nav items can be whileCounted. The assistant's own proposals reuse the chat's ApprovalCard, which gains an onDecided callback.

Motivation and Context

Adeel's workflow studio, module M8 (approvals inbox), brief in the project's workflow-studio/briefs/M8.md: "the /approvals page: Enter approves, decline has undo, a top-bar badge, and a Home 'Needs attention' row". Parts 1 to 4 were #447, #455, #457 and #458; this completes M8.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change; ! in the title)

Checklist:

  • The title is a Conventional Commit.
  • My code follows the code style of this project (make hooks checks it on commit).
  • I added or updated tests.
  • My change requires documentation updates, and I have updated docs/ accordingly.
  • Users need more than the title to understand it, so I wrote it under ## Unreleased in CHANGELOG.md. (n/a: studio modules land under one release note)

Done questions (AGENTS.md)

  • Goal: completes M8; merged on green CI.
  • Agents: the page uses the same API as agents; agents' tools came in feat(automations): agents read and decline approvals, and never approve #458.
  • Zero setup: the page and badge are there after install; nothing to configure.
  • Fewest clicks: one Enter per approval with focus moving on; undo instead of confirm; the chat link opens the right one first; no new nav item until something waits, so no journey takes more.
  • Configurable: n/a, no new setting.
  • Light: one small count query a minute while signed in; no new dependency.
  • Private and secure: shows only the signed-in person's approvals; approving still needs the session.
  • Cost: no model call.
  • User decides: every action waits for the pick; declining can be undone.
  • Upgrades: no change to stored data.
  • Honest: docs label the page built.
  • Tests (__tests__/approvals-model.test.ts, __tests__/approvals-page.test.tsx, __tests__/nav-groups.test.tsx), docs (automations.md); no schema change.
  • Open: no new dependency.
  • Reported; "refine later" in docs/automations.md (keys for decline and edit, live updates instead of reading each minute, the assistant's proposals shown with their estimates).

🤖 Generated with Claude Code

https://claude.ai/code/session_01VF3LK1DBx3dXX2b8c5T3cQ

/approvals lists what waits for the person's pick, each automation's together
and the assistant's by conversation: what it would do, why, its effect and
expiry, with the first in focus so Enter approves it, Edit in place, Always
allow where it can be, and Decline with Undo instead of a question. A badge
in the top bar and the nav count what waits, and Home's Needs attention has
a row for them.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VF3LK1DBx3dXX2b8c5T3cQ
@adeelahmad adeelahmad self-assigned this Oct 16, 2026
A new nav item pushed the ones below it off a phone's screen, so adding a
person and a namespace took a swipe more. With nothing waiting the nav is
as it was; the top bar's badge, Home's row and ⌘K still lead there.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VF3LK1DBx3dXX2b8c5T3cQ
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VF3LK1DBx3dXX2b8c5T3cQ
@adeelahmad
adeelahmad merged commit ac49eef into main Oct 16, 2026
10 checks passed
@adeelahmad
adeelahmad deleted the claude/project-thread-gfulp2 branch October 16, 2026 02:41
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

0