This repository was archived by the owner on Aug 6, 2026. It is now read-only.
Conversation
The web host (cloud-only) loaded taskDetailModule, which binds TASK_SERVICE with an injected PI_RUNNER, but never bound the token — so resolving the task views crashed with "No bindings found for service: Symbol(posthog.pi.runner)". A local pi session is a local-only capability (web has no local workspace and runs cloud/acp tasks), so bind PI_RUNNER to a stub that rejects at call time, matching how web already stubs other local-only host clients. The cloud path never invokes it (piRunner only fires for runtime === "pi"). Separately, the setup enricher/discovery scan a local repo directory (enrichment.detectPosthogInstallState), a procedure the web host router does not implement — so it 404'd with NOT_FOUND on every repo selection. Gate maybeStart on HOST_CAPABILITIES.localWorkspaces so the flow no-ops on cloud-only hosts; desktop keeps its default (localWorkspaces: true) behavior. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
gantoine
force-pushed
the
web-bind-pi-runner-stub-enricher
branch
from
July 24, 2026 14:40
4279c89 to
239f4ba
Compare
Reuse the desktop app icon as the web favicon and add the meta tags that make sense for the login-gated web edition: description, author, theme-color (the --ph-orange brand color), and Open Graph / Twitter title+description+image. Uses twitter:card=summary (square icon, not a large banner) and skips the deprecated keywords meta. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
|
👋 Visual changes detected for this PR. Review and approve in PostHog Visual Review If these changes are unexpected, they may be caused by a flaky test or a broken snapshot on master. Don't approve — rerun the job or wait for a fix. |
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
This PR has had no activity for 7 days and has been marked stale. We are moving to the monorepo and tightening PR staleness in preparation, so it will be closed in 7 days if no further activity occurs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three web-host (cloud-only) fixes found while booting
apps/web:PI_RUNNERwas unbound in the web container.taskDetailModulebindsTASK_SERVICE, which@inject(PI_RUNNER). Desktop binds that token as a platform adapter (TrpcPiRunner); web loaded the module but never bound the token, so resolving the task views crashed at boot:A local pi session is a local-only capability — web has no local workspace and runs cloud/
acptasks, sopiRunneronly ever fires forruntime === "pi". Addedapps/web/src/web-pi-runner.ts, a stub that rejects at call time (same pattern asweb-shell-client.ts), and bound it inweb-container.ts.The setup enricher 404'd on web.
runEnrichercallsenrichment.detectPosthogInstallState, which scans a local repo directory — a procedure the web host router doesn't implement, so every repo selection loggedNOT_FOUND. GatedmaybeStartinuseSetupDiscovery.tsonHOST_CAPABILITIES.localWorkspaces, so the enricher/discovery flow no-ops on cloud-only hosts. Desktop keeps its default (localWorkspaces: true) behavior.posthog-js never initialized for legacy project tokens.
main.tsxonly calledinitializePostHog()whenVITE_POSTHOG_API_KEYstarted withphc_. Older projects (e.g. "PostHog App + Website", project 2) use the legacy short token format (nophc_prefix), so the guard silently left posthog uninitialized — every feature flag readfalse, and cloud-only sidebar spaces (Loops, Channels) never appeared despite being rolled out. The guard's real intent is "reject unset/placeholder, accept a real key", so it now gates on a non-empty, non-placeholder value.Test plan
pnpm --filter @posthog/web buildsucceeds@posthog/uitypecheck clean (only pre-existing, unrelatedworkspace-server/agent.tserrors remain)apps/webwith a realVITE_POSTHOG_API_KEYand confirm: task views render without thePI_RUNNERcrash, no enricherNOT_FOUNDconsole error, and feature flags resolve (Loops/Channels appear for a@posthog.comuser)Notes
--no-verify: the repo-widepnpm typecheckpre-commit hook currently fails on unrelated issues —@posthog/agentcan't resolve@opentelemetry/exporter-trace-otlp-http, plus pre-existingworkspace-server/agent.tstype errors. Neither is touched by this PR.🤖 Generated with Claude Code