Skip to content

Settings › License: paste a key, see the plan, refresh it - #381

Merged
tiendc merged 1 commit into
mainfrom
feat/license-page
Dec 6, 2026
Merged

tiendc merged 1 commit into
mainfrom
feat/license-page

Conversation

@tiendc

@tiendc tiendc commented Dec 6, 2026

Copy link
Copy Markdown
Collaborator

Step 3 of docs/design/license.md: a License page of its own in Settings, just before About, as in packwing. Nothing is limited yet: Workspace::plan() reports the plan, and step 4 applies the limits.

The page

Without a key:

  • The plans and their prices. Pro and Business show Coming soon.
  • Buy Plus opens the portal's /pricing/shellwing (portal Host rail: status dot over the active tile's ring #33), which sells Plus and starts the 14-day trial.
  • A field to paste a key into, with Activate (or Enter). A key that is not shellwing's is refused, with a message that says nothing about the key.

With a key:

  • The plan it gives now, who it is issued to, and until when. After the key ends it shows the date the grace runs out; after that, the date it went Free.
  • Refresh, Manage subscription (the portal's subscriptions page) and Remove.
  • A toggle for [license] refresh.

The page shows "Until …" and not "Renews …", because a key does not say whether its subscription renews.

The key

  • Each device keeps its own key in the vault, as a device secret (license-key). It never syncs.
  • It is read when the vault opens, at start or when it is unlocked.
  • [license] refresh is on by default and belongs to this device; it is not among the synced settings. While it is on, the portal is asked once a day for a newer key, with the key alone. Only a newer key of the same license is kept.

core: Buy and Manage subscription open the portal's pages, which pricing_page() and subscriptions_page() build from the portal shellwing talks to. Before, they pointed at shellwing.app/pricing, which does not exist yet.

Tests

UI tests, in ui_tests/license.rs. No scenario reaches the portal: SHELLWING_PORTAL is a closed port in the child process, and a refresh asks a server the test runs.

  • A key is taken, kept in the vault and shown; Remove forgets it. Another product's key is refused.
  • A trial that has ended is Free.
  • Refresh takes a newer key of the same license, but not another license's key. With that check removed, the test fails.

The keys come from the portal's own signer and are valid until 2099, so the tests pass on any day. How to make them again is in crates/core/testdata/license/README.md.

Run: make lint, cargo clippy -p shellwing --features ui-tests --all-targets -D warnings, i18n.py check, the license UI tests, and the tests for core license and config. The rest of the UI tests were not run here; CI runs them.

Not checked: how the page looks on screen. The UI tests check what it shows, not the layout.

Docs: the License section in docs/configuration.md, and [license] in the sample config.toml. 36 strings in 14 languages.

🤖 Generated with Claude Code

The third step of docs/design/license.md: a page of its own, before
About, as packwing's.

- Without a key: the plans and their prices (Pro and Business coming
  soon), Buy Plus, which opens the portal's /pricing/shellwing (it sells
  Plus and starts the 14-day trial), and a field to paste a key, with
  Activate (or Enter).
- With one: the plan it gives now, who it is issued to and until when
  (past its end, the grace left, then Free since), Refresh, Manage
  subscription (the portal's subscriptions) and Remove.
- The key is this device's own: kept in the vault as a device secret
  (license-key), sealed with its key, never synced. It is read when the
  vault opens, at start or when unlocked.
- [license] refresh (on by default, this device's own): the portal is
  asked once a day, with the key alone, and a newer key of the same
  license is kept; nothing else is. Off, the key lasts to its end.
- Workspace::plan says what the key gives now: Free without one. Nothing
  is limited by it yet: the limits are the next step.

core: the portal's pricing and subscriptions pages, from the portal
shellwing talks to, in place of shellwing.app/pricing, which is not made.

UI tests (no scenario reaches the portal: SHELLWING_PORTAL is a closed
port in the child, a refresh asks a server of the test's): a key taken,
kept and removed, another product's refused; an ended trial is Free;
Refresh takes a newer key of the same license and not another license's.
The keys are the portal signer's, to 2099, so they pass on any day.

35 strings in 14 languages.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@tiendc
tiendc merged commit 9624819 into main Dec 6, 2026
5 checks passed
@tiendc
tiendc deleted the feat/license-page branch December 6, 2026 04:49
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