Skip to content

feat(mobile): manage agent guest access from Settings - #197

Merged
RossHartmann merged 3 commits into
mainfrom
feat/mobile-guest-access-settings
Oct 16, 2026
Merged

RossHartmann merged 3 commits into
mainfrom
feat/mobile-guest-access-settings

Conversation

@RossHartmann

@RossHartmann RossHartmann commented Oct 16, 2026 •

Copy link
Copy Markdown

Why. Owners could review guest-access approvals on the phone (#192), but everything else about who reaches their agents was desktop-only: grants, blocks, the access log and the digest. This adds that management to mobile, using the same server contracts desktop uses.

What. Settings → Guest access → Agent guest access opens one page for all of the owner's agents. It sits right after #198's Agents card.

  • Answer other people: each registered agent has a hosted-answer switch (PATCH /owner/agents/{id}). This is desktop's Policy tab. The row also shows who can ask and when the agent was last seen.
  • Grants: active grants (revoked and expired are filtered out). Each shows who it's for, the scope, the agent, the sources and question kind, expiry and use count. Revoke asks first.
  • Recent requests: the access log, newest first. Each request shows the outcome, tier, data used, the safety-check reasons and scores, and the kept question text. You can filter by agent (shown with more than one agent) and page back with "Show older requests" (cursor). Block asks first, then blocks the person from all agents, as desktop does.
  • Blocked people: each person's scope (all agents or one), when they were blocked and why. Unblock on each.
  • Shared via your agents: add a status or a note. Pick how long to share it (forever, 1, 7 or 30 days) and which agent shares it (all, or one). Stop sharing on each item.
  • Suggestions: Allow (this creates a grant) or Dismiss.
  • Daily digest: pick a UTC day (yesterday by default) and step back or forward. It shows the counts, outcomes and who asked. The server has no digest preferences: GET /owner/digest is read-only, and the daily digest alert goes out on its own. So this view is read-only and says so.
  • Organization → Agent guest safety (org admins only): this matches feat(desktop): org-admin guest safety card and alert Review deep links #193's admin card. It lists suspended requesters, with Restore access, and open alerts, with Mark reviewed. Anyone who gets admin_required doesn't see the row.

The entry is hidden when the build has no BUZZ_GUEST_ROUTE_URL, when the active community isn't the one the route serves, or when there's no signing key. This uses the same guestAccessClientProvider gate as #192. Pull to refresh reloads every owner read. Every change refreshes all of them and reports the route's error text in a snack bar.

Endpoints. These are the existing owner and admin routes, called through the #192 NIP-98 client. Nothing is added or changed server-side:
GET /owner/agents, PATCH /owner/agents/{id}, GET /owner/grants, DELETE /owner/grants/{id}, GET /owner/blocks, POST /owner/blocks, DELETE /owner/blocks/{id}, GET /owner/access-log, GET /owner/digest, GET|POST /owner/shareables, DELETE /owner/shareables/{id}, GET /owner/suggestions, POST /owner/suggestions/{id}/accept|dismiss, GET /admin/alerts, POST /admin/alerts/{id}/ack, POST /admin/requesters/{pubkey}/review.

Not included.

  • feat(desktop): org-admin guest safety card and alert Review deep links #193's alert-kind Review routing (Digest / Requests / admin card). Push-tap routing is being changed in parallel, so a mobile deep-link route for it comes in a follow-up.
  • Creating a grant by hand. Desktop doesn't offer this in its UI either.
  • Changing "who can ask". That's the agent's local respond_to setting on desktop, so the page points there.

Footprint.

  • New code is under mobile/lib/shared/guest_access/: records and wording, a GuestAccessOwnerApi extension in a part of the existing client, and settings/ pages with one public widget per file and private rows in part files.
  • settings_page.dart gets an import plus one section line, with no Kiingo strings.
  • feat(mobile): create and manage hosted agents from the phone #198 already classifies that file, so this PR adds no newly modified upstream file and no budget amendment. The fork inventory gets one new delta for the added paths; all budgets are unchanged.

Validation.

  • Ran with Hermit active, after merging current main: flutter pub get, dart format --output=none --set-exit-if-changed ., flutter analyze (no issues), node scripts/check-kiingo-fork-boundary.mjs (passes) and CHECK_FILE_SIZES_BASE=origin/main node desktop/scripts/check-file-sizes.mjs (passes).
  • I added test sources for the readers, the wording and the client's paths and bodies in mobile/test/shared/guest_access/guest_owner_settings_test.dart. Per fork policy they run only on Azure Spot; nothing was run on the Mac.
  • Not exercised on a device or simulator.

🤖 Generated with Claude Code

RossHartmann and others added 3 commits October 16, 2026 12:13
Adds the owner-side guest-access management desktop has in each agent's
Access dialog to the mobile app, across all of the owner's agents:
each agent's hosted-answer switch, active grants with Revoke, recent
requests (access log) with an agent filter, paging and Block, blocked
people with Unblock, items shared via my agent, learned-grant
suggestions, the read-only daily digest, and the org-admin guest safety
review (admins only).

The existing NIP-98 owner client gains the owner and admin routes desktop
uses as an extension; no server route is added or changed. Settings shows
the entry only when the build's guest route serves the active community.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Ross Hartmann <[email protected]>
Keeps both fork inventory deltas (#196 guest push taps and app icon, and
this branch's guest-access settings) and accounts for this branch's one
newly modified upstream file on top of main's budget (262 -> 263).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Ross Hartmann <[email protected]>
Keeps both sides of the Settings hook (#198's Agents card, then this
branch's Guest access card) and both fork inventory deltas. Settings is
already classified by the hosted-agents delta, so this branch no longer
adds a modified upstream file and drops its budget amendment.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Ross Hartmann <[email protected]>
@RossHartmann
RossHartmann merged commit efc7fb7 into main Oct 16, 2026
RossHartmann added a commit that referenced this pull request Oct 16, 2026
Brings in mobile agent guest-access management (#197) and the TestFlight
hosted-agent build flag (#200).

- The Settings guest-access section hook is re-ported onto upstream's
  restructured settings page, next to the hosted-agents row.
- lucide_icons_flutter is gone upstream (block#8109), so the new guest-access
  settings pages use BuzzIcons (Tabler). Four glyphs that BuzzIcons does not
  name (ban, calendar, calendar-month, history) are added to the fork-owned
  GuestAccessIcons. keyRound maps to BuzzIcons.key.
- The inventory takes main's new guest-access settings delta. Budgets are
  unchanged (277 / 156 / 9577 / 1163).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Ross Hartmann <[email protected]>
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.

1 participant