Repository navigation
Open the Create site dialog when the app launches with no sites - #798
Open
ryanwelcher wants to merge 3 commits into
Open
ryanwelcher wants to merge 3 commits into
ryanwelcher wants to merge 3 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
|
This was referenced Nov 27, 2026
This branch has not been deployed
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.
Why
At WCEH Contributor Day, first-time contributors opened the app, saw "No sites" and a Create site button, and did not know what the button would do. They stopped there. See #730.
What changes
When the app launches and its site list loads with no sites in it, the Create site dialog opens by itself, focused on the name field.
src/renderer/launch-create-offer.cjs, with unit tests.index.jsxkeeps the flag and the call.Deliberately not in it: renaming "site" (to "Contribution Environment", as the issue suggests), any new or changed string, and a stored "first launch" flag.
How to test this
The journeys cover the reported path:
npm run test:e2e:hidden -- tests/e2e/journeys/shell.spec.js, from the repository root. "a window with no site in it opens the create dialog…" and "the dialog an empty launch opens starts in the folder…" both fail without the change.node --test tests/unit/launch-create-offer.test.cjscovers the wait for settings and the once-only rule.What the journeys cannot reach is a packaged build on a fresh profile. Platforms: any. Use the Buildkite artifact for the current head.
Starting state: the app has never been run on this machine, or every site has been deleted from it.
What must not have happened:
Risks and limitations
tests/e2e/real-setup/create-site.spec.jswas updated to wait for the dialog instead of clicking the button. It runs only through the manualreal-setup.ymlworkflow and was not run.i18n.spec.js:1047) fails locally, and fails the same way with trunk's renderer. It is not caused by this branch.Related
Fixes #730
Design decisions and alternatives considered
Review outcome (required — see AGENTS.md)
4 [fix here] · 1 [follow-up]. All 4 fixed, 1 deferred.
.github/instructions/code-review.instructions.md. Reviewed headedd8caa2364c798f1835b2f60e844dcb19fc620f, base8ac1794b43cd5a52d5bbb5022d1e4bf4419b6964.npm run lintwas clean andnpm testpassed before the judgement pass.index.jsxand unit-untestable. It is nowlaunch-create-offer.cjs, with tests.empty-stateandcreate-site-modalscreenshot shots, anddocs/guide/creating-a-site.md, assumed the dialog had to be clicked open. The shots were re-captured:empty-statecame out byte-identical, andcreate-site-modalnow shows the name field's placeholder, which the committed image predated.edd8caa→576a8afe16bb4b7932fc2afc6b8a00137c0dd894. That commit holds the four fixes above. Each was checked by its own test, andnpm run lint,npm test(2323 pass, 0 fail) and the shell, delete-site, create-site and legacy-site journeys (11/11) passed on it. It was not re-reviewed by a fresh context.Implementation notes
useSitesgainsloaded, its ownuseState, becauseapplySetupcallers replace the{ sites, siteMeta }pair whole.index.jsx,Promise.all([loadLocale(), loadSettings()])), so in practice the wait for settings matters only when that first read fails.Screenshots or recording
What a launch with no sites now shows (
docs/public/screenshots/create-site-modal.pngon this branch):Before, the same launch showed
docs/public/screenshots/empty-state.png("No sites" and a Create site button). That is now what the window shows after the dialog is closed.🤖 Generated with Claude Code