Skip to content

chore(client): remove the Steam account-linking signpost - #4844

Merged
Celant merged 1 commit into
mainfrom
josh/remove-steam-link-signpost
Aug 3, 2026
Merged

chore(client): remove the Steam account-linking signpost#4844
Celant merged 1 commit into
mainfrom
josh/remove-steam-link-signpost

Conversation

@Celant

@Celant Celant commented Aug 3, 2026

Copy link
Copy Markdown
Member

Description:

Removes the one-time first-launch signpost on the Steam desktop build that told players account linking wasn't implemented yet and that a fresh Steam install always creates a new account.

Two reasons:

  1. It is about to stop being true. Account linking is being built now and the Steam release is gated on it shipping, so by the time this message could reach a released build it would be wrong.

  2. Its copy never reached non-English players. steam.link_signpost only ever existed in en.json. The other language files are Crowdin-managed and never picked it up, so every non-English locale fell back to the English string.

What's removed

  • src/client/SteamLinkSignpost.ts and its test
  • The <steam-link-signpost> mount point in index.html and the import in Main.ts
  • The steam.link_signpost key (this emptied the steam namespace, so the namespace goes too)
  • common.got_it — the signpost's dismiss button was its only consumer, which TranslationSystem's unused-key check flags. ios_banner.got_it is a separate key and is untouched.

Pure deletion: 85 lines removed, nothing added.

Verification

  • npm test — 223 files / 2568 tests, plus 31 files / 289 server tests, all passing
  • tsc --noEmit clean
  • prettier --check clean on the changed files

Please complete the following:

  • I have added screenshots for all UI updates — n/a, this removes UI rather than adding it. The element being deleted rendered a dismissible toast at the bottom of the home page on Steam builds only.
  • I process any text displayed to the user through translateText() and I've added it to the en.json file — n/a, no new text; two now-unused keys removed from en.json.
  • I have added relevant tests to the test directory — n/a, the only test for the removed component is deleted with it. TranslationSystem's existing unused-key check covers the en.json side.

Note on the PR gate

No linked approved issue: this is internal Steam-release cleanup rather than community-contributed work, so it should clear the gate on repo permission. Happy to file an issue and relink if that's the preferred route.

The signpost was a one-time first-launch toast on the Steam desktop build
telling players that account linking wasn't implemented yet and a fresh
Steam install always creates a new account.

Removing it for two reasons:

1. It is about to stop being true. Account linking is being built now, and
   the Steam release is gated on it shipping — so by the time anyone can
   see this message in a released build, it will be wrong.

2. Its copy never reached non-English players. `steam.link_signpost` only
   ever existed in en.json; the other language files are Crowdin-managed
   and never picked it up, so every non-English locale fell back to the
   English string.

Removes the component, its test, the mount point in index.html, the import
in Main.ts, and the `steam.link_signpost` key. Also drops `common.got_it`,
which the signpost was the only consumer of — TranslationSystem's
unused-key check catches this. `ios_banner.got_it` is a separate key and
is untouched.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JRMRzHbZp2VhxbxqDMw4Zr
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0aa5db51-e451-4d83-91b7-e9161474d354

📥 Commits

Reviewing files that changed from the base of the PR and between 9f3423d and a155ec1.

📒 Files selected for processing (5)
  • index.html
  • resources/lang/en.json
  • src/client/Main.ts
  • src/client/SteamLinkSignpost.ts
  • tests/client/SteamLinkSignpost.test.ts
💤 Files with no reviewable changes (5)
  • index.html
  • tests/client/SteamLinkSignpost.test.ts
  • resources/lang/en.json
  • src/client/SteamLinkSignpost.ts
  • src/client/Main.ts

Walkthrough

The homepage no longer includes the Steam link signpost. Its component, import, translations, and tests were removed.

Changes

Steam link signpost removal

Layer / File(s) Summary
Remove signpost component and wiring
index.html, src/client/Main.ts, src/client/SteamLinkSignpost.ts, tests/client/SteamLinkSignpost.test.ts
The custom element, its registration, side-effect import, Steam visibility and dismissal logic, and related tests were removed.
Remove obsolete translations
resources/lang/en.json
The common.got_it and steam.link_signpost translations were removed.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

Suggested labels: UI/UX

Suggested reviewers: evanpelle

Poem

The signpost leaves the page,
Its strings fade from the stage.
Imports rest, tests depart,
Clean files make a lighter chart.
Steam points no more today.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes removal of the Steam account-linking signpost.
Description check ✅ Passed The description directly explains the removed signpost, related cleanup, rationale, and verification.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Celant
Celant merged commit 1f4bce3 into main Aug 3, 2026
15 of 16 checks passed
@Celant
Celant deleted the josh/remove-steam-link-signpost branch August 3, 2026 13:37
@github-project-automation github-project-automation Bot moved this from Triage to Complete in OpenFront Release Management Aug 3, 2026
Celant added a commit that referenced this pull request Aug 5, 2026
## Description:

The browser half of Steam account linking, for the upcoming Steam
desktop release.

The desktop Electron build shows a gate at first launch asking whether
the player already has a web OpenFront account. If they do, it mints an
opaque token server-side and opens the browser at `#steam-link?token=…`.
This PR is what happens on this side: parse the token, show the player
which two accounts are about to be linked, and redeem it on confirm.
When the browser handoff fails entirely (wrong default browser, odd
Linux setup, Steam's overlay browser), the desktop shows an 8-character
code instead, and this PR provides the form to type it into.

This is the change that makes account linking real — #4844 already
removed the toast telling Steam players it was "coming in a later
update".

### What's here

- `src/client/SteamLink.ts` — token parsing, the pending-link stash
(consumed on read, with a `kind` discriminator so a stashed token and a
stashed code-entry intent can't be confused), and redemption against
`POST /auth/steam/link`.
- `src/client/SteamLinkModal.ts` — the confirmation modal, in two modes
(token and code entry).
- `src/client/AccountModal.ts` — a "Link an existing account" action
that renders **only** when the Electron preload bridge is present, so
plain web is untouched.
- `resources/lang/en.json` only. No other language file — those are
Crowdin's.

### The confirmation step is the point

The token is opaque and carries nothing about the account. On a shared
machine the browser may be logged into someone else's session, and
linking is not freely reversible. So the modal shows both names and
stops:

- The **Steam persona** comes from `GET /auth/steam/link_ticket/:token`.
- The **web account** comes from the logged-in session via `/users/@me`
— never from the token, which is attacker-controllable.

Confirm is disabled until both have loaded, and a partial load fails
closed rather than showing a confirm button next to a blank name.
Following this repo's `username ?? publicId` convention
(`ApiSchemas.ts:429-430`, `PlayerName.ts:36`) matters more here than
usual: `username` is null until claimed, so without the fallback the
prompt would have read "…with account your account?" for most players
and identified nothing.

### Server contract

Fixed, and not changed by this PR: `200` linked (idempotent), `409` with
a machine-readable `reason` surfaced verbatim so each refusal gets its
own message, `410` expired, `429` throttled with `Retry-After` (rendered
as "wait", never as "wrong code" — the throttle refuses correct codes
too), `401` → `logOut()`.

The endpoints live in the private infra repo and are not deployed yet.
Nothing here breaks before they are: every failure path resolves to an
error state in the modal, and the desktop gate fails open independently.

## Please complete the following:

- [x] I have added screenshots for all UI updates — happy to add these;
the modal needs a running desktop build plus a server-minted token to
reach a realistic state, so say the word if a mocked screenshot is
useful.
- [x] I process any text displayed to the user through translateText()
and I've added it to the en.json file — all strings via
`translateText()`, keys added to `en.json` only, alphabetically sorted,
and `TranslationSystem`'s unused-key check is green.
- [x] I have added relevant tests to the test directory —
`tests/client/SteamLink.test.ts`, `tests/client/SteamLinkModal.test.ts`,
and additions to `tests/client/AccountModal.rendering.test.ts`.

### Verification

`npx vitest run tests/client` plus the translation gates → 70 files /
875 tests passing, on top of current `main`. `tsc --noEmit`, ESLint and
Prettier all clean.

### Known and deliberate

- No TTL on the pending-link stash — an abandoned login leaves an entry
that surfaces a confirm modal on a later login, which then resolves to
an error state. Confirm-gated, so cosmetic. Being addressed separately
along with a short `/link` alias for the hand-typed path.
- The code input has no `maxlength`/`autocapitalize`/`aria-label`; worth
a polish pass.

Happy to fold either in if you'd rather they didn't land as-is.

### Note on the PR gate

No linked `approved` issue — this is internal Steam-release work rather
than a community contribution, so it should clear on repo permission.
Glad to file an issue and relink if you'd prefer that route.

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Complete

Development

Successfully merging this pull request may close these issues.

1 participant