Skip to content

Remove hosted apps and previews through native workflows - #39

Merged
tnkuehne merged 4 commits into
mainfrom
feat/cloudflare-app-removal
Oct 15, 2026
Merged

tnkuehne merged 4 commits into
mainfrom
feat/cloudflare-app-removal

Conversation

@tnkuehne

@tnkuehne tnkuehne commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

App and preview deletion now works through the existing CLI, HTTP API and management UI on Hosted installations. Removal is accepted by the native APP_OPERATIONS Workflow, marks the app and preview descendants as deleting, and cleans children before their parent. Self-hosted retains the existing agent queue and deletion implementation.

Cleanup unpublishes each app, removes its Cron/Queue routing and consumers, purges its native app Workflow instances, detaches its own runtime bindings, and deletes its D1, R2, KV and Queue resources, including dead-letter queues. A paginated inventory includes resources from historical artifacts. Bucket objects and artifacts are deleted in bounded pages; SQL deletion happens last. Shared connectors and other apps remain intact.

Provisioning and removal admission take the existing app row lock. Resource creation uses stable app-specific names: a repeated attempt finds an existing resource or creates the missing resource, using bounded native Workflow retries. There is no additional resource-creation table, migration or background reconciler. A remote CREATE that completes only after deletion has finished can leave an orphan requiring manual cleanup; the app is not held indefinitely waiting for an unconfirmed creation. Existing confirmation guards for shared runtime bindings, subscriptions and connector uploads remain unchanged.

Small permanent host and event deletion markers prevent delayed publication from reviving a removed app; a new app can reuse the hostname. Subscription updates never recreate missing queues. Removal authorization is checked before admission, and a command from a revoked grantee cannot prevent an owner from deleting. Admission retains the existing app lock through command storage and native Workflow acceptance. Repeated DELETEs for a deleting app acknowledge the existing removal without rewriting command files or admitting another Workflow. Exhausted retries retain the failure and deleting state; recovery requires an explicit native Workflow restart. Repeating DELETE does not automatically restart a failed instance. Retained logs expire under Cloudflare's normal retention policy.

Validation of the current revision: 41 native workerd deployment/operation tests, 11 provisioning tests, 9 binding-confirmation tests, 4 resource-removal tests and 40 existing platform API tests pass. Coverage includes creation without a server-side effect, lost creation responses, deletion after exhausted creation retries and a runtime restart, preview isolation, paginated history, stale activation, authorization and hostname reuse. pnpm check passes. Cloud provisioning APIs use synthetic local fixtures; no live infrastructure was changed. CI and review must assess this revision independently of the previous revision.

Based on main after #38 merged. The runtime artifact advances from 0.2.5 to 0.2.6 for deletion-marker support; publication and installed-runtime rollout are separate. No new dependencies or public documentation changes.

RetriggerView in GreptileConfidence Score: 5/5

The latest changes appear safe to merge and address the outstanding command-file race.

Summary

Hosted app deletion runs through native Workflows, cleans previews before parents, and removes app-owned resources before SQL rows.

  • Hosted app removal runs through the native workflow.
  • App removal clears previews, routes, and app-owned resources.
  • Deleted app markers keep stale publications from returning.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Authorize and lock app] --> B{Already deleting?}
  B -->|Yes| C[Return accepted without writing]
  B -->|No| D[Store command and admit Workflow]
  D --> E[Release app lock]
  E --> F[Mark app and previews deleting]
  F --> G[Clean children before parent]
  G --> H[Remove resources and stored files]
  H --> I[Delete SQL rows]
Loading

Reviews (4) · Last reviewed commit: "Avoid rewriting commands during app remo..." · Reviewed by Greptile

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
widefleet-docs ba98058 Oct 15 2026, 01:48 PM

tnkuehne added a commit that referenced this pull request Oct 15, 2026
Hosted app logs are now written to Cloudflare Workers Logs and read
through the existing `widefleet logs`, HTTP API and management UI.
Dynamic Worker tails attribute console output, browser reports and
native failures to the app and deployed version; browser reports keep
their original build for source-map resolution. Cloudflare Workflow
application errors are logged before transport without changing
retry/control-signal behavior.

The query adapter preserves app authorization, deployment/build
filtering, severity/source/request/trace/text filters, signed pagination
and source-map resolution. Every query is scoped to the installation's
runtime Worker and authorized app. The self-hosted OTLP/ClickHouse path
remains selected independently. The runtime artifact advances to 0.2.5.

Validation: 21 workerd runtime tests, 6 log-normalization tests, 10
authorized query tests, 40 existing platform API tests and 23 celld
runtime tests. Type checking, formatting, lint, Cloudflare build and
Wrangler dry-run pass. Native logging is tested with local workerd; the
Cloudflare query endpoint uses documented response fixtures and has not
been exercised against a live account.

Operational details: the control-plane API token needs Workers
Observability Write permission to run queries. Hosted logs use
Cloudflare's seven-day retention and native event pagination. Follow
uses the tail's receive timestamp and the client's existing
overlap/deduplication window; Cloudflare does not expose the ClickHouse
ingestion watermark, so indexing delays beyond that overlap can require
a fresh history query. Oversized forwarded records are explicitly
truncated before exceeding the Cloudflare record limit. No
infrastructure was deployed.

The CLI orders each complete follow window by receive time across
backend pages. Its temporary ordering buffer is capped at 32 MiB /
100,000 records and reports an actionable error when exceeded. Restored
Workflow step errors are not logged a second time by the outer runner.
Both changes have targeted regression tests; Rust log tests and Clippy
also pass.

CI on `54adefb`: source checks, Cloudflare tests, release-image checks
and Greptile pass. Three existing tests failed: [oauth2-proxy login
after container
restart](https://github.com/widefleet/widefleet/actions/runs/38649878396/job/116145746945)
reached a browser error page; [the browser-network/Traefik
test](https://github.com/widefleet/widefleet/actions/runs/38649878396/job/116145746875)
exceeded its 180-second timeout; [the macOS Intel starter/bootstrap
test](https://github.com/widefleet/widefleet/actions/runs/38649878396/job/116145746817)
also timed out. These tests and their affected command/network paths are
unchanged. The first PR commit, `cf83373`, completed the full CI
successfully. No failed jobs were manually rerun.

The stacked deletion PR #39 includes this exact logs implementation and
completed the [full CI successfully on
`58c8206`](https://github.com/widefleet/widefleet/actions/runs/38652554639),
including the three suites above. The checks on this PR itself retain
their original results.
Base automatically changed from feat/cloudflare-logs to main October 15, 2026 10:02
@tnkuehne
tnkuehne force-pushed the feat/cloudflare-app-removal branch from 58c8206 to d257f1a Compare October 15, 2026 13:35
@tnkuehne
tnkuehne merged commit cdd8c3f into main Oct 15, 2026
19 checks passed
@tnkuehne
tnkuehne deleted the feat/cloudflare-app-removal branch October 15, 2026 14:08
tnkuehne added a commit that referenced this pull request Oct 27, 2026
…#110)

Adds an optional Cloudflare parent-runtime observer for native workflow
creation responses and first `step.do` callback attempts. It supplies
trusted app/version identity and the existing native instance UUID.
Completed cache replays and retries do not emit another first-attempt
event; explicit restarts can execute first attempts again. The product
version advances to 0.4.12.

Creation observations distinguish resolved native creates from ambiguous
rejected responses. They run before catalog confirmation. Background
delivery never gates app execution; errors, resets and termination can
lose observations. Existing creation recovery, read-only lookups,
suspension and native results/errors remain unchanged. The hook does not
count sleeps/event waits, provider billing totals, state bytes or
orchestration CPU, and is not enabled for celld. No application
parameters, step names, results or error text are included.

Validation:
- `pnpm check` passed (build, workspace typechecks, format and
type-aware lint).
- Native local workerd test covers duplicate/batch creation, recovered
and missing native instances, retries, pause/resume, full/partial
restart, suspension, terminal errors, stalled/rejected delivery and
parent-only extension initialization.
- All 62 existing local Cloudflare runtime regression tests passed.

No deployment or hosted execution was performed. The local engine tests
establish adapter behavior, not provider invoice equivalence.




<!-- greptile_comment -->

<!-- greptile_summary -->

<h2><a
href="https://app.greptile.com/api/retrigger?id=89085634"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/RetriggerDark.svg?v=2"><source
media="(prefers-color-scheme: light)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"><img
alt="Retrigger"
src="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"
align="right"></picture></a><a
href="https://app.greptile.com/mendra/github/widefleet/widefleet/-/pull/110"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptileDark.svg?v=2"><source
media="(prefers-color-scheme: light)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2"><img
alt="View in Greptile"
src="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2"
align="right"></picture></a>Confidence Score: 5/5</h2>

<!-- greptile-impact-verdict --> The PR appears safe to merge; no
actionable issues were found.

<details open><summary><h3>Summary</h3></summary>

Adds an optional parent-side observer for native Cloudflare workflow
creation and first `step.do` attempts.
- Cloudflare workflows can report creation outcomes and first step
attempts.

No actionable issues were found. Tests were inspected but not run during
this review.
</details>

<details open><summary><h3>Diagram</h3></summary>

```mermaid
%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Catalog create] --> B[Native create]
  B --> C[Queue create observation]
  C --> D[Catalog confirmation or recovery lookup]
  E[Native do callback] --> F{Attempt is 1?}
  F -->|Yes| G[Queue started observation]
  F -->|No| H[Run app callback]
  G --> H
  C -.-> I[Background extension delivery]
  G -.-> I
```
</details>

<!-- greptile_confidence_score:5 -->

<sub>Reviews (2) · Last reviewed commit: ["Merge remote-tracking branch
&#39;origin/mai..."](c3b85ff)
· [Reviewed by
Greptile](https://www.greptile.com/?utm_source=greptile_review&utm_medium=github&utm_campaign=review_public&utm_content=widefleet/widefleet)</sub>

<!-- /greptile_comment -->
tnkuehne added a commit that referenced this pull request Nov 19, 2026
## Problem

Organizations want to show published apps inside pages their colleagues
already use, such as a Microsoft Teams tab or a company portal. Today an
app cannot be framed by another site, and company sign-in does not work
in a frame:

- App responses send `frame-ancestors 'self'`.
- Identity providers refuse to render their sign-in pages in frames.
- The app session cookie is `SameSite=Lax`, so a cross-site frame never
sends it.

## Changes

**Settings.** Organizations list the page origins that may embed their
apps (`embeddingOrigins`, HTTPS origins with optional `*.` subdomain
wildcard). This works through the settings UI (new **Embedded apps**
section for Entra connections) and the existing settings API and CLI
export/apply. An input that omits the field keeps the saved list, so
older settings files do not clear it. The list is published with the app
sign-in configuration only for Entra app identity, and removing SSO
clears it.

**Frame ancestors.** The auth proxy passes the organization's list to
the runtime, which adds it to each app response's `frame-ancestors`. App
code cannot change it.

**Embedded sign-in.** A framed HTML navigation without a session
(`Sec-Fetch-Dest: iframe`) goes to `/oauth2/ORG/embedded` on the auth
host instead of the provider:

1. The page asks its parent for a host token
(`widefleet:host-token-request`) and accepts the answer only from a
configured origin. Tokens are exchanged with the auth host only, never
with the app frame.
2. The proxy verifies the token as an Entra v2 delegated access token
for the organization's app sign-in client and tenant. Its audience is
the same client that signs users in to apps, so it proves the same
identity as a regular sign-in.
3. It resolves groups with an on-behalf-of Microsoft Graph token,
reusing the existing nested group lookup. Apps receive the same user ID
(`oid`), and app access rules apply unchanged.
4. It issues a separate `HttpOnly; Secure; SameSite=None; Partitioned`
session cookie that expires with the host token. The cookie exists only
under the embedding top-level site and holds no refresh credential.
After expiry, the next framed navigation asks the host again, so access
is rechecked with every new token.
5. Before returning to the app, the page confirms that the browser kept
the session. If it did not, the page offers to open the app in a new tab
instead of looping.

Sign-out also clears the embedded session. `docs/architecture.md`
records the boundary.

## Screens

Settings and the embedded sign-in page with synthetic fixtures, rendered
from the merge base (`4dbf4aa0`) and from this branch at 1280 and 390
px.

### Company sign-in settings

Before, the page has no embedding section. After, Entra connections show
**Embedded apps** below the email domains, and the removal text mentions
embedding hosts.

| | Before | After |
|---|---|---|
| light, 1280 px | <img
src="https://gist.githubusercontent.com/tnkuehne/0aed2a4d87718647ac85fb2c65c06462/raw/7b427b4618b5c5d00beb7d0ac48be3fb3831f613/before-sso-domains-light-1280.png"
alt="Before, light, 1280 px" width="380"> | <img
src="https://gist.githubusercontent.com/tnkuehne/0aed2a4d87718647ac85fb2c65c06462/raw/7b427b4618b5c5d00beb7d0ac48be3fb3831f613/after-sso-domains-light-1280.png"
alt="After, light, 1280 px" width="380"> |
| light, 390 px | <img
src="https://gist.githubusercontent.com/tnkuehne/0aed2a4d87718647ac85fb2c65c06462/raw/7b427b4618b5c5d00beb7d0ac48be3fb3831f613/before-sso-domains-light-390.png"
alt="Before, light, 390 px" width="170"> | <img
src="https://gist.githubusercontent.com/tnkuehne/0aed2a4d87718647ac85fb2c65c06462/raw/7b427b4618b5c5d00beb7d0ac48be3fb3831f613/after-sso-domains-light-390.png"
alt="After, light, 390 px" width="170"> |
| dark, 1280 px | <img
src="https://gist.githubusercontent.com/tnkuehne/0aed2a4d87718647ac85fb2c65c06462/raw/7b427b4618b5c5d00beb7d0ac48be3fb3831f613/before-sso-domains-dark-1280.png"
alt="Before, dark, 1280 px" width="380"> | <img
src="https://gist.githubusercontent.com/tnkuehne/0aed2a4d87718647ac85fb2c65c06462/raw/7b427b4618b5c5d00beb7d0ac48be3fb3831f613/after-sso-domains-dark-1280.png"
alt="After, dark, 1280 px" width="380"> |
| dark, 390 px | <img
src="https://gist.githubusercontent.com/tnkuehne/0aed2a4d87718647ac85fb2c65c06462/raw/7b427b4618b5c5d00beb7d0ac48be3fb3831f613/before-sso-domains-dark-390.png"
alt="Before, dark, 390 px" width="170"> | <img
src="https://gist.githubusercontent.com/tnkuehne/0aed2a4d87718647ac85fb2c65c06462/raw/7b427b4618b5c5d00beb7d0ac48be3fb3831f613/after-sso-domains-dark-390.png"
alt="After, dark, 390 px" width="170"> |

### Embedding hosts

A saved host, and the Add host dialog rejecting an HTTP origin.

| | Saved host | Invalid origin |
|---|---|---|
| light, 1280 px | <img
src="https://gist.githubusercontent.com/tnkuehne/0aed2a4d87718647ac85fb2c65c06462/raw/7b427b4618b5c5d00beb7d0ac48be3fb3831f613/after-sso-embedding-light-1280.png"
alt="Saved host, light, 1280 px" width="380"> | <img
src="https://gist.githubusercontent.com/tnkuehne/0aed2a4d87718647ac85fb2c65c06462/raw/7b427b4618b5c5d00beb7d0ac48be3fb3831f613/after-sso-embedding-dialog-light-1280.png"
alt="Invalid origin, light, 1280 px" width="380"> |
| light, 390 px | <img
src="https://gist.githubusercontent.com/tnkuehne/0aed2a4d87718647ac85fb2c65c06462/raw/7b427b4618b5c5d00beb7d0ac48be3fb3831f613/after-sso-embedding-light-390.png"
alt="Saved host, light, 390 px" width="170"> | <img
src="https://gist.githubusercontent.com/tnkuehne/0aed2a4d87718647ac85fb2c65c06462/raw/7b427b4618b5c5d00beb7d0ac48be3fb3831f613/after-sso-embedding-dialog-light-390.png"
alt="Invalid origin, light, 390 px" width="170"> |
| dark, 1280 px | <img
src="https://gist.githubusercontent.com/tnkuehne/0aed2a4d87718647ac85fb2c65c06462/raw/7b427b4618b5c5d00beb7d0ac48be3fb3831f613/after-sso-embedding-dark-1280.png"
alt="Saved host, dark, 1280 px" width="380"> | <img
src="https://gist.githubusercontent.com/tnkuehne/0aed2a4d87718647ac85fb2c65c06462/raw/7b427b4618b5c5d00beb7d0ac48be3fb3831f613/after-sso-embedding-dialog-dark-1280.png"
alt="Invalid origin, dark, 1280 px" width="380"> |
| dark, 390 px | <img
src="https://gist.githubusercontent.com/tnkuehne/0aed2a4d87718647ac85fb2c65c06462/raw/7b427b4618b5c5d00beb7d0ac48be3fb3831f613/after-sso-embedding-dark-390.png"
alt="Saved host, dark, 390 px" width="170"> | <img
src="https://gist.githubusercontent.com/tnkuehne/0aed2a4d87718647ac85fb2c65c06462/raw/7b427b4618b5c5d00beb7d0ac48be3fb3831f613/after-sso-embedding-dialog-dark-390.png"
alt="Invalid origin, dark, 390 px" width="170"> |

### Embedded sign-in page (new)

Shown in a frame of `https://portal.example.test`: waiting for the host,
the host reporting that it has no token, and missing admin consent.

| | Signing in | No host token | Consent required |
|---|---|---|---|
| light, 1280 px | <img
src="https://gist.githubusercontent.com/tnkuehne/0aed2a4d87718647ac85fb2c65c06462/raw/7b427b4618b5c5d00beb7d0ac48be3fb3831f613/after-embedded-signing-in-light-1280.png"
alt="Signing in, light, 1280 px" width="260"> | <img
src="https://gist.githubusercontent.com/tnkuehne/0aed2a4d87718647ac85fb2c65c06462/raw/7b427b4618b5c5d00beb7d0ac48be3fb3831f613/after-embedded-unsupported-light-1280.png"
alt="No host token, light, 1280 px" width="260"> | <img
src="https://gist.githubusercontent.com/tnkuehne/0aed2a4d87718647ac85fb2c65c06462/raw/7b427b4618b5c5d00beb7d0ac48be3fb3831f613/after-embedded-consent-light-1280.png"
alt="Consent required, light, 1280 px" width="260"> |
| light, 390 px | <img
src="https://gist.githubusercontent.com/tnkuehne/0aed2a4d87718647ac85fb2c65c06462/raw/7b427b4618b5c5d00beb7d0ac48be3fb3831f613/after-embedded-signing-in-light-390.png"
alt="Signing in, light, 390 px" width="120"> | <img
src="https://gist.githubusercontent.com/tnkuehne/0aed2a4d87718647ac85fb2c65c06462/raw/7b427b4618b5c5d00beb7d0ac48be3fb3831f613/after-embedded-unsupported-light-390.png"
alt="No host token, light, 390 px" width="120"> | <img
src="https://gist.githubusercontent.com/tnkuehne/0aed2a4d87718647ac85fb2c65c06462/raw/7b427b4618b5c5d00beb7d0ac48be3fb3831f613/after-embedded-consent-light-390.png"
alt="Consent required, light, 390 px" width="120"> |
| dark, 1280 px | <img
src="https://gist.githubusercontent.com/tnkuehne/0aed2a4d87718647ac85fb2c65c06462/raw/7b427b4618b5c5d00beb7d0ac48be3fb3831f613/after-embedded-signing-in-dark-1280.png"
alt="Signing in, dark, 1280 px" width="260"> | <img
src="https://gist.githubusercontent.com/tnkuehne/0aed2a4d87718647ac85fb2c65c06462/raw/7b427b4618b5c5d00beb7d0ac48be3fb3831f613/after-embedded-unsupported-dark-1280.png"
alt="No host token, dark, 1280 px" width="260"> | <img
src="https://gist.githubusercontent.com/tnkuehne/0aed2a4d87718647ac85fb2c65c06462/raw/7b427b4618b5c5d00beb7d0ac48be3fb3831f613/after-embedded-consent-dark-1280.png"
alt="Consent required, dark, 1280 px" width="260"> |
| dark, 390 px | <img
src="https://gist.githubusercontent.com/tnkuehne/0aed2a4d87718647ac85fb2c65c06462/raw/7b427b4618b5c5d00beb7d0ac48be3fb3831f613/after-embedded-signing-in-dark-390.png"
alt="Signing in, dark, 390 px" width="120"> | <img
src="https://gist.githubusercontent.com/tnkuehne/0aed2a4d87718647ac85fb2c65c06462/raw/7b427b4618b5c5d00beb7d0ac48be3fb3831f613/after-embedded-unsupported-dark-390.png"
alt="No host token, dark, 390 px" width="120"> | <img
src="https://gist.githubusercontent.com/tnkuehne/0aed2a4d87718647ac85fb2c65c06462/raw/7b427b4618b5c5d00beb7d0ac48be3fb3831f613/after-embedded-consent-dark-390.png"
alt="Consent required, dark, 390 px" width="120"> |

Not shown: the 15-second timeout and the server-error state, which use
the same layout as "No host token" with the generic message.

## Verification

- `pnpm check`, full `pnpm exec vitest run` against the local test
services (1101 passed), and the self-hosted SSO Playwright spec.
- New proxy tests cover redirects for framed and top-level navigations,
rejection of unregistered destinations and organizations without
embedding, the token exchange, cookie attributes, forwarded identity,
app access rules, expiry, and rejection of tokens for another client,
another tenant, app-only or v1 tokens. They also cover the Origin and
content-type checks, consent and outage errors, and sign-out.
- A Chromium test (`RUN_EDGE_TESTS=1`) embeds an app from a cross-site
page that answers the token request. It checks the forwarded identity
and the cookie's partition key, and that a page on an unlisted site gets
no app. Without `Partitioned` the test fails.
- Settings integration test for publishing, preserving and clearing the
list. The e2e spec adds and removes a host in the UI and validates
input. I checked the screenshots at 1280 and 390 px in light and dark:
the section matches **Email domains**, the page does not scroll
horizontally, and focus returns to **Add host** after the dialog.

Not verified here: a real Teams client, and Safari. Safari supports
partitioned cookies from 26.2. Playwright's Linux WebKit does not
implement cookie partitions, so it cannot test this flow.

Documentation: #223 (draft, blocked on the release that contains this
change).










<!-- greptile_comment -->

<!-- greptile_summary -->

<h2><a
href="https://app.greptile.com/api/retrigger?id=112065034&amp;sig=31cfd749d677c796ff54c0cc4ae2022e7ea36d93367f4e84fc12cba1ec6881ba"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/RetriggerDark.svg?v=2"><source
media="(prefers-color-scheme: light)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"><img
alt="Retrigger"
src="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"
align="right"></picture></a><a
href="https://app.greptile.com/-/switch-tenant?tenant=mendra&amp;next=%2Fwidefleet%2Fwidefleet%2Fpull%2F222&amp;utm_source=greptile_review&amp;utm_medium=github&amp;utm_campaign=view_in_greptile"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptileDark.svg?v=2"><source
media="(prefers-color-scheme: light)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2"><img
alt="View in Greptile"
src="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2"
align="right"></picture></a>Confidence Score: 5/5</h2>

<!-- greptile-impact-verdict --> The PR appears safe to merge; no
blocking issues were found.

<details open><summary><h3>Summary</h3></summary>

Adds host-token sign-in for embedded Entra apps, with
organization-approved embedding sites and separate, short-lived browser
sessions.

- Embedded apps sign users in through their host instead of a provider
page.
- Admins can choose which HTTPS sites are allowed to embed their apps.
- App responses allow only the organization’s configured sites to frame
them.

No new actionable issues found.
</details>

<details open><summary><h3>Diagram</h3></summary>

```mermaid
sequenceDiagram
    participant Host as Approved host page
    participant Auth as Auth sign-in frame
    participant Entra as Microsoft Entra
    participant Graph as Microsoft Graph
    participant App as Published app
    Auth->>Host: Request host token
    Host->>Auth: Return delegated token
    Auth->>Auth: Check signature, tenant, and audience
    Auth->>Entra: Exchange token on behalf of user
    Entra-->>Auth: Graph access token
    Auth->>Graph: Read user and groups
    Graph-->>Auth: Identity and memberships
    Auth->>Auth: Set partitioned session and confirm cookie
    Auth->>App: Return to app
    App->>App: Check session and app access rules
```
</details>

<!-- greptile_confidence_score:5 -->

<sub>Reviews (4) · Last reviewed commit: ["Merge remote-tracking branch
&#39;upstream/m..."](d3e958d)
· [Reviewed by
Greptile](https://www.greptile.com/?utm_source=greptile_review&utm_medium=github&utm_campaign=review_public&utm_content=widefleet/widefleet)</sub>

<!-- /greptile_comment -->
tnkuehne added a commit that referenced this pull request Nov 20, 2026
Second layer of the personal connections stack. Management names a
member's app identity from what it already knows, and the runtime
accepts `UserConnection` calls only from management.

## Background

Connectors store each user's account under the app identity that app
sign-in issues: issuer plus subject. My connections runs in management,
so management must name that identity for the signed-in member.

| Organization | App identity | What management already has |
| --- | --- | --- |
| No required company SSO | `(PLATFORM_URL/api/auth, user ID)`: apps
sign in through Widefleet | the user |
| Required company SSO, Google or OIDC | `(issuer, sub)` | the SSO
`account` row; management and app sign-in use the same registration, so
the `sub` is the same |
| Required company SSO, Entra | `(issuer, oid)` | the SSO `account` row,
but keyed by the registration's pairwise `sub` |

Only Entra differed. Entra's `sub` is pairwise per app registration; app
sign-in uses the stable object ID, as Better Auth's own Microsoft
provider does since 1.7.0
([#10204](better-auth/better-auth#10204)).
`@better-auth/sso` still keys every OIDC account by `sub`, and 1.7.0
removed its `mapping.id`.

## What changes

**Management keys Entra accounts by object ID**
- `patches/@[email protected]` adds an `accountSubject`
option, like Generic OAuth's: the account identifier of a verified OIDC
sign-in, defaulting to `sub`.
- Management returns the `oid` for Entra providers and rejects tokens
from another tenant. Other providers keep `sub`.
- Migration `0034` rekeys existing Entra SSO accounts from the ID token
saved at their last sign-in. An ID token that is not a readable JWT
leaves its account unchanged.
- The MCP CLI login finds the account by the app identity's subject. The
separate account subject in MCP tokens is gone.

**`createAppUserIdentity`** returns `(issuer, subject, name)`:
- Without required SSO: the Widefleet account, only for members with a
verified email, as app sign-in requires.
- With required SSO: the issuer app sign-in uses, and the member's SSO
account. A session without one, such as a recovery session, is refused
with `403`.

**Runtime endpoint** `/.well-known/widefleet/user-connections`,
reachable only through authenticated runtime management:
- Refuses an identity whose issuer is not the one app sign-in publishes
(`409`).
- Finds the organization's app exporting `UserConnection` (`404`
otherwise). App access groups do not apply: a member manages only their
own account, while using the app still requires them.
- Passes the connector a caller proof valid for five minutes. Allows
only `status`, `prepare` and `disconnect`, checks their results, keeps
launch links on the connector's origin and does not relay connector
errors.

## Tests

- **`app-user-identity.integration.test.ts`, real SSO callback against
an Entra fixture whose `oid` differs from `sub`:**
  - the account row holds the object ID
  - the identity's issuer matches the published app sign-in
  - a repeated sign-in finds the same account
  - another tenant is rejected without creating an account
  - other providers keep `sub`
  - Widefleet mode, including the refusal for an unverified email
  - a member without a company account is refused
- the migration rekeys an Entra account, skips unreadable ID tokens and
social accounts, and the person still signs in afterwards
- Without the patch's Entra rule, the object-ID and tenant cases fail.
- **`managed-oauth-runtime.test.ts`, real loader:** unauthenticated and
malformed requests, a foreign issuer, a foreign app, access groups,
isolation between users, and disconnection.
- `mcp-cli-login.integration.test.ts` and the Entra login edge test now
expect the object ID.


<!-- greptile_comment -->

<!-- greptile_summary -->

<h2><a
href="https://app.greptile.com/api/retrigger?id=114219007&amp;sig=5213648a841ae2b0136a8842f33617337f7b53695ecdec056ead8164afe45d86"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/RetriggerDark.svg?v=2"><source
media="(prefers-color-scheme: light)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"><img
alt="Retrigger"
src="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"
align="right"></picture></a><a
href="https://app.greptile.com/-/switch-tenant?tenant=mendra&amp;next=%2Fwidefleet%2Fwidefleet%2Fpull%2F246&amp;utm_source=greptile_review&amp;utm_medium=github&amp;utm_campaign=view_in_greptile"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptileDark.svg?v=2"><source
media="(prefers-color-scheme: light)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2"><img
alt="View in Greptile"
src="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2"
align="right"></picture></a>Confidence Score: 3/5 <sup><img alt="Tier:
apex" title="Review tier: apex"
src="https://greptile-static-assets.s3.amazonaws.com/badges/effort-apex.svg?v=3"
height="12"></sup></h2>

<!-- greptile-risk -->

The PR should not merge until company assertions expire based on the
last company sign-in.

<h2>Findings</h2>

1. <img alt="P1"
src="https://greptile-static-assets.s3.amazonaws.com/badges/p1.svg?v=9"
align="top">&nbsp;<img alt="Security"
src="https://greptile-static-assets.s3.amazonaws.com/badges/Security.svg?v=2"
align="top">&nbsp;**Company sign\-in cutoff is missing** <a
href="https://github.com/widefleet/widefleet/pull/246#discussion_r4645868889">▶</a>

<details open><summary><h3>Summary</h3></summary>

Builds a member's app identity from linked management accounts and adds
management-only `UserConnection` controls.

- Entra management accounts use the same identity as app sign-in.
- Members can manage their connector accounts through the runtime.
- MCP CLI sign-in uses the app identity subject.

Code review only; tests were not run.
</details>

<details open><summary><h3>Diagram</h3></summary>

```mermaid
sequenceDiagram
  participant Member
  participant Management
  participant Accounts
  participant Runtime
  participant Connector
  Member->>Management: Request personal connection action
  Management->>Accounts: Read linked account subject
  Management->>Runtime: Send identity and action
  Runtime->>Runtime: Check issuer, organization, and app
  Runtime->>Connector: Call UserConnection with signed proof
  Connector-->>Runtime: Return result
  Runtime-->>Management: Return checked result
```
</details>

<!-- greptile_confidence_score:3 -->

<sub>Reviews (5) · Last reviewed commit: ["Let management assert a
member&#39;s app
ide..."](06fd28b)
· [Reviewed by
Greptile](https://www.greptile.com/?utm_source=greptile_review&utm_medium=github&utm_campaign=review_public&utm_content=widefleet/widefleet)</sub>

<!-- /greptile_comment -->
tnkuehne added a commit that referenced this pull request Nov 20, 2026
Third layer of the personal connections stack. It brings the My
connections page from #188 onto the app identity of the previous layer.

## What changes

**My connections** is a new entry in the workspace navigation, open to
every member.
- **Which connectors appear:** the organization's web apps whose active
deployment exports `UserConnection`. A catalog listing is not required,
so connectors installed from a template appear right away. App access
groups do not apply: members manage only their own account, while using
the app still requires them.
- **Rows:** each row shows the account label, **Connect**, or **Awaiting
administrator setup**.
- **Account options:** **Reconnect** and **Disconnect**. Disconnect asks
for an inline confirmation.
- **Unreachable connectors** show **Could not check this account** with
**Try again**. They are never shown as disconnected.
- **No company account:** in an organization that requires company SSO,
a session without one, such as a recovery session, sees why instead of a
list.
- **Status checks** run at most four at a time, with a shared
five-second deadline. Failed checks, except those cut off by the
deadline, go to the existing exception reporting with the app ID and a
failure kind. Connector responses are not included.

**API:** `GET /api/v1/user-connections`, `POST
/api/v1/user-connections/{appId}/connect` (body `{}`), `DELETE
/api/v1/user-connections/{appId}`.
- Reads need `platform:read`; writes need `platform:write`.
- Caller identity and completion URL are set by the server.

The Node control plane reaches the runtime through a shared
`runtimeManagementRequest`, which app sign-in publication now uses as
well. Hosted uses the existing `APP_RUNTIME` binding.

## Screenshots

Synthetic fixtures: desktop 1440 × 1000, mobile 390 × 844.

**Navigation, before and after**

| Before | After |
| --- | --- |
| ![Before, desktop
light](https://gist.githubusercontent.com/tnkuehne/b4268338afa6e8170eb2930f2a8dfae9/raw/81a1e4378293100a6f79ee0ab85eaec0a2696783/before-workspace-desktop-light.png)
| ![After, desktop
light](https://gist.githubusercontent.com/tnkuehne/b4268338afa6e8170eb2930f2a8dfae9/raw/81a1e4378293100a6f79ee0ab85eaec0a2696783/after-workspace-desktop-light.png)
|
| ![Before, desktop
dark](https://gist.githubusercontent.com/tnkuehne/b4268338afa6e8170eb2930f2a8dfae9/raw/81a1e4378293100a6f79ee0ab85eaec0a2696783/before-workspace-desktop-dark.png)
| ![After, desktop
dark](https://gist.githubusercontent.com/tnkuehne/b4268338afa6e8170eb2930f2a8dfae9/raw/81a1e4378293100a6f79ee0ab85eaec0a2696783/after-workspace-desktop-dark.png)
|

| Before · mobile menu | After · mobile menu |
| --- | --- |
| <img
src="https://gist.githubusercontent.com/tnkuehne/b4268338afa6e8170eb2930f2a8dfae9/raw/81a1e4378293100a6f79ee0ab85eaec0a2696783/before-menu-mobile-light.png"
width="300"> | <img
src="https://gist.githubusercontent.com/tnkuehne/b4268338afa6e8170eb2930f2a8dfae9/raw/81a1e4378293100a6f79ee0ab85eaec0a2696783/after-menu-mobile-light.png"
width="300"> |

<details>
<summary>Mobile workspace, light and dark</summary>

| Before | After |
| --- | --- |
| <img
src="https://gist.githubusercontent.com/tnkuehne/b4268338afa6e8170eb2930f2a8dfae9/raw/81a1e4378293100a6f79ee0ab85eaec0a2696783/before-workspace-mobile-light.png"
width="300"> | <img
src="https://gist.githubusercontent.com/tnkuehne/b4268338afa6e8170eb2930f2a8dfae9/raw/81a1e4378293100a6f79ee0ab85eaec0a2696783/after-workspace-mobile-light.png"
width="300"> |
| <img
src="https://gist.githubusercontent.com/tnkuehne/b4268338afa6e8170eb2930f2a8dfae9/raw/81a1e4378293100a6f79ee0ab85eaec0a2696783/before-workspace-mobile-dark.png"
width="300"> | <img
src="https://gist.githubusercontent.com/tnkuehne/b4268338afa6e8170eb2930f2a8dfae9/raw/81a1e4378293100a6f79ee0ab85eaec0a2696783/after-workspace-mobile-dark.png"
width="300"> |

</details>

**My connections (new page)**

| Desktop · light | Desktop · dark |
| --- | --- |
| ![My connections, desktop
light](https://gist.githubusercontent.com/tnkuehne/b4268338afa6e8170eb2930f2a8dfae9/raw/81a1e4378293100a6f79ee0ab85eaec0a2696783/after-accounts-desktop-light.png)
| ![My connections, desktop
dark](https://gist.githubusercontent.com/tnkuehne/b4268338afa6e8170eb2930f2a8dfae9/raw/81a1e4378293100a6f79ee0ab85eaec0a2696783/after-accounts-desktop-dark.png)
|

| Mobile · light | Mobile · dark |
| --- | --- |
| <img
src="https://gist.githubusercontent.com/tnkuehne/b4268338afa6e8170eb2930f2a8dfae9/raw/81a1e4378293100a6f79ee0ab85eaec0a2696783/after-accounts-mobile-light.png"
width="300"> | <img
src="https://gist.githubusercontent.com/tnkuehne/b4268338afa6e8170eb2930f2a8dfae9/raw/81a1e4378293100a6f79ee0ab85eaec0a2696783/after-accounts-mobile-dark.png"
width="300"> |

<details>
<summary>Account options, disconnection, unavailable and empty
states</summary>

| Account options | Confirm disconnection |
| --- | --- |
| <img
src="https://gist.githubusercontent.com/tnkuehne/b4268338afa6e8170eb2930f2a8dfae9/raw/81a1e4378293100a6f79ee0ab85eaec0a2696783/after-mobile-account-menu.png"
width="300"> | <img
src="https://gist.githubusercontent.com/tnkuehne/b4268338afa6e8170eb2930f2a8dfae9/raw/81a1e4378293100a6f79ee0ab85eaec0a2696783/after-mobile-disconnect.png"
width="300"> |

| Unavailable and retry | No connectors |
| --- | --- |
| <img
src="https://gist.githubusercontent.com/tnkuehne/b4268338afa6e8170eb2930f2a8dfae9/raw/81a1e4378293100a6f79ee0ab85eaec0a2696783/after-mobile-unavailable.png"
width="300"> | <img
src="https://gist.githubusercontent.com/tnkuehne/b4268338afa6e8170eb2930f2a8dfae9/raw/81a1e4378293100a6f79ee0ab85eaec0a2696783/after-mobile-empty.png"
width="300"> |

</details>

The message for a session without a company account is not in the
screenshots; the integration test covers it.

## Tests

- **`user-connections.integration.test.ts`:**
  - visible connectors only, under the member's identity
  - outages vs. inaccessible apps
  - API authentication and rejected overrides
  - the concurrency limit and deadline
  - the company account as identity, and the refusal without one
- **Playwright, real company sign-in:** management sign-in through the
emulated Entra tenant; My connections asserts the tenant issuer and the
account's object ID.
- **Playwright, with and without JavaScript:** navigation, connect,
reconnect, cancelled and confirmed disconnection, retry, account
switching, duplicate names, incomplete setup and the empty state.
Invitation acceptance still opens the workspace without status checks.


<!-- greptile_comment -->

<!-- greptile_summary -->

<h2><a
href="https://app.greptile.com/api/retrigger?id=114219041&amp;sig=b59cad9fdefc4201c4785b1152a0951d2c29045683ab5364794e912687ad94ab"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/RetriggerDark.svg?v=2"><source
media="(prefers-color-scheme: light)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"><img
alt="Retrigger"
src="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"
align="right"></picture></a><a
href="https://app.greptile.com/-/switch-tenant?tenant=mendra&amp;next=%2Fwidefleet%2Fwidefleet%2Fpull%2F247&amp;utm_source=greptile_review&amp;utm_medium=github&amp;utm_campaign=view_in_greptile"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptileDark.svg?v=2"><source
media="(prefers-color-scheme: light)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2"><img
alt="View in Greptile"
src="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2"
align="right"></picture></a>Confidence Score: 5/5</h2>

<!-- greptile-impact-verdict --> The PR appears safe to merge with its
intentional account-management behavior.

<details open><summary><h3>Summary</h3></summary>

Adds **My connections** and authenticated API routes for listing,
connecting, and disconnecting personal connector accounts.

- The API lists and changes a member’s personal connector accounts.
- Members can manage personal connector accounts from My connections.
- Node and hosted control planes now reach connector management through
the app runtime.
</details>

<details open><summary><h3>Diagram</h3></summary>

```mermaid
sequenceDiagram
  participant Member
  participant Control as Control plane
  participant Runtime as App runtime
  participant Connector
  Member->>Control: Open My connections
  Control->>Control: Find connectors and name member identity
  Control->>Runtime: Check status, four at a time
  Runtime->>Connector: UserConnection.status
  Connector-->>Control: Account status
  Member->>Control: Connect
  Control->>Runtime: Prepare with server-set completion URL
  Runtime->>Connector: UserConnection.prepare
  Runtime->>Runtime: Check launch origin and expiry
  Runtime-->>Control: Launch URL
  Control-->>Member: Redirect to connector
```
</details>

<!-- greptile_confidence_score:5 -->

<sub>Reviews (7) · Last reviewed commit: ["Use the member&#39;s company
account as the
..."](2f0b150)
· [Reviewed by
Greptile](https://www.greptile.com/?utm_source=greptile_review&utm_medium=github&utm_campaign=review_public&utm_content=widefleet/widefleet)</sub>

<!-- /greptile_comment -->
tnkuehne added a commit that referenced this pull request Nov 22, 2026
## Why

Linear's schema has a `_dummy: String!` query without a description. The
template offers it as a method, so it shows up in search results for the
deployed template.

## What changes

- `scripts/operations.ts` lists `_dummy` as not offered, with a new
reason for placeholder fields. `src/api.ts` and `src/schema.ts` are
regenerated without it: 421 methods.

## Verification

- `pnpm typecheck` and `pnpm test` in `templates/linear`
- `pnpm lint`


<!-- greptile_comment -->

<!-- greptile_summary -->

<h2><a
href="https://app.greptile.com/api/retrigger?id=115966509&amp;sig=528ecab5ad3ae6e405c9508747ad3bc4e41ae81f27f72a456bc3a3c8c2961779"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/RetriggerDark.svg?v=2"><source
media="(prefers-color-scheme: light)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"><img
alt="Retrigger"
src="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"
align="right"></picture></a><a
href="https://app.greptile.com/-/switch-tenant?tenant=mendra&amp;next=%2Fwidefleet%2Fwidefleet%2Fpull%2F312&amp;utm_source=greptile_review&amp;utm_medium=github&amp;utm_campaign=view_in_greptile"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptileDark.svg?v=2"><source
media="(prefers-color-scheme: light)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2"><img
alt="View in Greptile"
src="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2"
align="right"></picture></a>Confidence Score: 5/5</h2>

<!-- greptile-impact-verdict --> The PR appears safe to merge.

<details open><summary><h3>Summary</h3></summary>

Hides Linear’s placeholder query from the template’s offered methods.
- Linear's method list no longer includes the `_dummy` placeholder
query.
</details>

<!-- greptile_confidence_score:5 -->

<sub>Reviews (1) · Last reviewed commit: ["Hide the Linear schema&#39;s
placeholder
que..."](733a099)
· [Reviewed by
Greptile](https://www.greptile.com/?utm_source=greptile_review&utm_medium=github&utm_campaign=review_public&utm_content=widefleet/widefleet)</sub>

<!-- /greptile_comment -->
tnkuehne added a commit that referenced this pull request Nov 23, 2026
## Problem

Wrangler's `secrets.required` declares the secrets a Worker cannot run
without. Widefleet rejects unknown Wrangler keys, so a project that uses
the key cannot be deployed, and a deployment cannot record which secrets
its code needs.

## Change

**`widefleet deploy` and the template builder accept
`secrets.required`.**
- The format follows [Cloudflare's configuration
reference](https://developers.cloudflare.com/workers/wrangler/configuration/):
`"secrets": { "required": ["API_KEY"] }`.
- Names follow the contract's rules: valid secret names, without the
reserved `WIDEFLEET_` prefix or `__proto__`, unique, at most 128, and
different from every binding and variable, including the `ASSETS`
binding every deployment gets. The CLI and the builder report a mistake
before building.

**Template installs validate the build before creating the app.** A
template whose build the upload would reject now fails without leaving
an app behind.

**Each deployed version carries its list.**
- The deployment metadata stores it as `required_secrets`, so every
stored version, including one a rollback selects, keeps its own list.
- The control plane validates the list again. Runtimes do not receive
it.

The next PRs in this stack check the list when deploying (#353), ask for
the values when installing a template (#354), and declare the list in
the templates that need their organization's OAuth client (#355).

## Tests

- CLI unit test for parsing and every validation rule, including
`__proto__`, 129 names and `ASSETS` without an `assets` key.
- Builder test for the metadata it produces and its validation errors,
with the same cases (`RUN_BUILDER_TESTS=1`).
- Integration test: a template build with an undeployable list fails
before the app exists.
- Contract tests for the metadata, including that runtimes do not
receive the list.
- Ran `pnpm check`, the unit and integration suites, `cargo clippy
--workspace` and the CLI Rust tests.

Stack: #352 (this PR) → #353 → #354 → #355. The docs follow in #356.


<!-- greptile_comment -->

<!-- greptile_summary -->

<h2><a
href="https://app.greptile.com/api/retrigger?id=116868847&amp;sig=8186589490fcb6f27be9c10c3a9940bc27064ec179368c3f1891dcb21edb80df"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/RetriggerDark.svg?v=2"><source
media="(prefers-color-scheme: light)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"><img
alt="Retrigger"
src="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"
align="right"></picture></a><a
href="https://app.greptile.com/-/switch-tenant?tenant=mendra&amp;next=%2Fwidefleet%2Fwidefleet%2Fpull%2F352&amp;utm_source=greptile_review&amp;utm_medium=github&amp;utm_campaign=view_in_greptile"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptileDark.svg?v=2"><source
media="(prefers-color-scheme: light)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2"><img
alt="View in Greptile"
src="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2"
align="right"></picture></a>Confidence Score: 5/5</h2>

<!-- greptile-impact-verdict --> This PR appears safe to merge; both
previous findings are fixed and no new actionable issues were found.

<details open><summary><h3>Summary</h3></summary>

Carries Wrangler's `secrets.required` into each deployment as
`required_secrets`, while keeping it out of runtime metadata.

- CLI deployments carry Wrangler's required secret names into their
metadata.
- Template builds carry Wrangler's required secret names into bundle
metadata.
- The control plane keeps required secret names with each version and
leaves them out of runtime metadata.
</details>

<!-- greptile_confidence_score:5 -->

<sub>Reviews (2) · Last reviewed commit: ["Validate a template&#39;s
build before
creat..."](75571e6)
· [Reviewed by
Greptile](https://www.greptile.com/?utm_source=greptile_review&utm_medium=github&utm_campaign=review_public&utm_content=widefleet/widefleet)</sub>

<!-- /greptile_comment -->
jonathanlaib added a commit that referenced this pull request Nov 24, 2026
## Problem

Home shows every published app as a tile, connectors included, although
connectors already have their place on My connections. A tile stacks its
icon above the name, and its **Open app** button sits alone in the
bottom corner, with nothing beside it. A tile does not say which
connectors its app works with.

## Change

**Apps only.** Home lists the published apps that are not connectors. An
app is a connector when its active deployment offers personal
connections. The count above the cards and the search follow that list.

**Cards.** A card puts the icon beside the name and shows up to two
lines of the description. Every card ends with the same bar: the
connectors the app works with on the left, **Open app** on the right.
The whole card still leads to the app's page.

**Connectors on a card.** Small overlapping icons name the published
connectors the app's active deployment may call; a card shows up to four
and counts the rest. They say what the app works with, not whether the
reader has connected an account, so Home still checks no connector.

**My connections.** A published connector's name leads to its page, now
that Home has no card for it.

**API and CLI.** Catalog entries return `connector` and `uses`, the IDs
of the apps the active deployment may call. `uses` was part of an app's
page before and is the same there.

## Not included

- A list of connectors on Home with the reader's status. Home
deliberately opens without status checks.
- A connector that is not published gets no icon on a card, because the
catalog does not list it.
- Recently used apps and tags for kinds of apps.

## Design

The cards follow the app directories of Vercel, Linear and Langdock:
icon and name first, a quiet last line for details, and no button that
floats in a corner. Three rendered variants were compared before this
one was built.

## Screenshots

Synthetic fixture: a member, two published apps and three published
connectors. The fixture's apps have no icons of their own, so the
fallback icon stands in.

| | Before | After |
|---|---|---|
| Home | <img
src="https://gist.githubusercontent.com/jonathanlaib/ab68279d4ff46a6ecda9ed0efcb99869/raw/1f1d6acfeaa058ee4891ec0216a8450f4cee884e/detail-home-1280-light.png"
width="380"> | <img
src="https://gist.githubusercontent.com/jonathanlaib/ab68279d4ff46a6ecda9ed0efcb99869/raw/7b78654267b89d5aed7dcf0f8a825a741ebe5a4d/home-cards-1440-light.png"
width="380"> |

| | |
|---|---|
| At 390 pixels, dark | <img
src="https://gist.githubusercontent.com/jonathanlaib/ab68279d4ff46a6ecda9ed0efcb99869/raw/7b78654267b89d5aed7dcf0f8a825a741ebe5a4d/home-cards-390-dark.png"
width="200"> |

## Verification

- `pnpm typecheck`, `pnpm format:check`, `pnpm lint`
- `pnpm exec vitest run apps/control-plane/tests` against local Postgres
and object storage, and the CLI suite against the built CLI. New and
changed cases: the catalog marks connectors, and entries return the apps
a deployment may call.
- `tests/e2e/auth.spec.ts` and `tests/e2e/organization-writes.spec.ts`,
all 64 tests. New cases: Home shows no connector as an app; a card names
the two connectors its app calls and a card without connectors shows
none; opening Home checks no connector; a published connector's name on
My connections leads to its page. One unrelated test, switching
organizations from the sidebar, failed once in a full run and passed
alone and in a rerun of its file.
- Rendered result checked at 1440 and 390 pixels wide, in light and
dark: no clipping or horizontal overflow. Not checked: cards with real
app icons, a card with more than four connectors, and a long app name.

Documentation: #351 (draft, blocked until a release contains this
change).




<!-- greptile_comment -->

<!-- greptile_summary -->

<h2><a
href="https://app.greptile.com/api/retrigger?id=117214292&amp;sig=f738bc660b732d948295804a26d1137d638f7cf0c06d97d25749b183d03c7d44"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/RetriggerDark.svg?v=2"><source
media="(prefers-color-scheme: light)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"><img
alt="Retrigger"
src="https://greptile-static-assets.s3.amazonaws.com/badges/Retrigger.svg?v=2"
align="right"></picture></a><a
href="https://app.greptile.com/-/switch-tenant?tenant=mendra&amp;next=%2Fwidefleet%2Fwidefleet%2Fpull%2F365&amp;utm_source=greptile_review&amp;utm_medium=github&amp;utm_campaign=view_in_greptile"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptileDark.svg?v=2"><source
media="(prefers-color-scheme: light)"
srcset="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2"><img
alt="View in Greptile"
src="https://greptile-static-assets.s3.amazonaws.com/badges/ViewInGreptile.svg?v=2"
align="right"></picture></a>Confidence Score: 5/5</h2>

<!-- greptile-impact-verdict --> The PR appears safe to merge; the
latest change fixes the connector link delay without introducing a new
issue.

<details open><summary><h3>Summary</h3></summary>

Home shows published apps as cards, leaves connectors on My connections,
and names each app’s published connectors.

- Catalog entries identify connectors and list the apps each app may
call.
- Home cards list regular apps and show the connectors they may use.
- Published connector names open their app pages from My connections.
</details>

<!-- greptile_confidence_score:5 -->

<sub>Reviews (2) · Last reviewed commit: ["Link a connector&#39;s name
to its page
whil..."](60ab057)
· [Reviewed by
Greptile](https://www.greptile.com/?utm_source=greptile_review&utm_medium=github&utm_campaign=review_public&utm_content=widefleet/widefleet)</sub>

<!-- /greptile_comment -->
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