feat(login): "try this next" command box + silence benign post-login log#376
Merged
Conversation
After a successful `pg login`, render a bordered Callout suggesting the commands a newly paired user can run next (`pg decentralize`, `pg mod`, `pg deploy`), each with a short description. The command list lives in a pure-data sibling (nextSteps.ts) so it stays testable without React; NextStepsCallout.tsx is a thin map over it. The box shows on every successful login, after the "setup complete" row.
On `pg login` completion the session adapter is destroyed, and a still-live
statement-store subscription can surface a bare Error("Not connected") from
the just-closed websocket. That teardown artifact was already swallowed as an
unhandled rejection, but @novasamatech/statement-store also logs it directly
from its subscription error callback, printing a scary stack after a
successful login.
Extend the local pnpm patch so that callback also early-returns on a bare
Error whose message is exactly "not connected" (trimmed, case-insensitive),
in addition to DestroyedError. The match mirrors isBenignUnsubscriptionError
in process-guard.ts, so a contextual mid-work failure still escalates.
Contributor
|
Dev build ready — try this branch: |
Contributor
E2E Test Pass · ✅ PASSTag:
Sentry traces: view spans for this run |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Two changes that improve the end of the
pg loginflow.1. "Try one of these next" box (feature)
After a successful login, users often don't know what to run next. The login screen now ends with a bordered information box suggesting the creative entry-point commands:
pg decentralize— take any static website and deploy it to a .dot domainpg mod— browse community apps and mod thempg deploy— deploy an app you've already builtThe command list lives in a pure-data sibling (
nextSteps.ts, no React) so it stays testable;NextStepsCallout.tsxis a thin map over it, rendered via the existing sharedCallout. The box shows on every successful login, after the "setup complete" row.2. Silence benign "Not connected" log after sign-in (fix)
On login completion the session adapter is destroyed, and a still-live statement-store subscription can surface a bare
Error("Not connected")from the just-closed websocket. That teardown artifact was already swallowed as an unhandled rejection, but@novasamatech/statement-storealso logs it directly from its subscription error callback, printing a scary stack right after a successful login:The local pnpm patch silencing that callback only matched
DestroyedError. This extends it to also early-return on a bareErrorwhose message is exactlynot connected(trimmed, case-insensitive), mirroringisBenignUnsubscriptionErrorinprocess-guard.ts— so a contextual mid-work failure still escalates. Regenerated viapnpm patch/patch-commit, so the lockfile patch hash is updated in lockstep.Testing
nextSteps.test.tslocks the three commands, thepgprefix, and no-em-dash house style.isBenignUnsubscriptionError, which is itself pinned byprocess-guard.test.ts(exact-match passes, contextual messages escalate).format:check,lint:license,typecheck,test(873 passed).Changesets
login-next-steps.md(minor) — the next-steps boxlogin-not-connected-log.md(patch) — the log suppression