Skip to content

Guidance: a get-started checklist and next-step hints - #261

Merged
fylorn merged 1 commit into
devfrom
guide
Oct 1, 2026
Merged

fylorn merged 1 commit into
devfrom
guide

Conversation

@fylorn

@fylorn fylorn commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

First run. The Overview's "never used" empty state becomes a three-step checklist:

  1. Add an upstream.
  2. Connect a client.
  3. Send a first request.

Each step is ticked from the current facts, not from which buttons were pressed:

  • How many upstreams there are.
  • Which clients are connected: adopted, set up by hand with a key, or already probing the gateway.

So an upstream added elsewhere counts too. Only the current step offers its button ("New upstream…", "Go to Clients"), and the third step shows that it is waiting for a request. When the first real request arrives (local answers to probes do not count, matching the Overview's existing rule), the checklist gives way to the usage figures.

During use. One-line hints appear at the moment they apply. Each carries the button for the next step and "Don't show again", and disappears on its own when its condition stops holding:

Where When Next step
Overview the first request went through (only for people who saw the checklist, so upgraders are never told about a "first" request) View request
Upstreams upstreams exist, no client is connected, no requests yet Go to Clients
Clients no upstream yet New upstream…
Clients clients are connected (named) but no request has arrived Go to Traffic
Traffic there are requests (what opening one shows)
Security protections in Observe (with the count) (set to Enforce once the log shows no false positives)

Settings. Dismissed hints are kept on this computer (localStorage, key tw-guide), not in config.yaml. Settings › General gains Guidance › Show again, which is disabled when nothing has been dismissed.

Implementation. Everything lives in src/guide/ and builds on the existing Banner. Hints get one lightbulb icon used for nothing else. The copy follows the terminology table ("接管"). The copy test bans 「知道了」 as conversational, so the dismiss action is 「不再显示」.

Tests: src/guide/hints.test.ts covers showing, dismissing across a restart, resetting, the setup-seen flag, unreadable storage and storage that cannot be written; the full suite and tsc pass. Checked in the preview harness in light and dark mode, zh and en, at 1100×720:

  • fresh install;
  • upstreams and clients configured but no traffic;
  • a live first request, with "View request" opening it;
  • Traffic, Security and Settings;
  • dismissing and resetting.

🤖 Generated with Claude Code

First run: the Overview's "never used" empty state becomes a three-step
checklist (add an upstream, connect a client, send a first request).
Each step is ticked from the facts — how many upstreams there are, which
clients are connected (adopted, or set up by hand with a key, or whose
probes the gateway already answered) — not from which buttons were
pressed, so an upstream added elsewhere counts too. Only the current step
offers its button; the last one shows that it is waiting for a request.
The checklist gives way to the usage figures when the first real request
arrives.

During use, one-line hints at the moment they apply, each with the
button for the next step and "Don't show again":
- Overview: the first request went through (only for people who saw the
  checklist; upgraders are not told about a "first" request), with a
  button that opens it.
- Upstreams: there are upstreams but no client is connected yet.
- Clients: no upstream yet; or clients are connected but no request has
  arrived, naming them.
- Traffic: what opening a request shows.
- Security: how many protections are in Observe, and that they can be set
  to Enforce once the log shows no false positives.

Hints disappear on their own when their condition stops holding. What was
dismissed is kept on this computer (localStorage), not in config.yaml,
and Settings › General gains "Guidance › Show again". The checklist and
hints use the existing Banner (one lightbulb icon for hints only) and the
"接管" terminology.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fylorn
fylorn merged commit 8b3bcd6 into dev Oct 1, 2026
4 checks passed
@fylorn
fylorn deleted the guide branch October 1, 2026 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant