diff --git a/README.md b/README.md index acab06e1..f7c318de 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Each of these has a page in the user guide. - **[Link a Trac ticket](https://wordpress.github.io/contributor-toolkit/guide/trac-tickets)** to a Core site and read its facts in the app: summary, status and resolution, type, milestone, component, keywords, age. A ticket can also arrive from a browser: the app answers `wpct://ticket/62281` links and offers the ticket to the site you have open. On a Gutenberg site, **[link a GitHub issue](https://wordpress.github.io/contributor-toolkit/guide/gutenberg-issues)** instead, and the app lists the pull requests that cite it. - **[Try the work that already exists on it](https://wordpress.github.io/contributor-toolkit/guide/applying-patches)**: pull requests are checked out on their own branches with the author's commits, on both projects, while on Core `.diff` and `.patch` files are previewed and applied to the current ticket as removable layers. When a patch file will not apply, the app says which regions failed and why, and leaves the checkout untouched. - **[Hold work for several tickets or issues in one site](https://wordpress.github.io/contributor-toolkit/guide/ticket-branches)**. Each one gets its own branch inside the site, so moving between them is a file swap of seconds instead of another clone and another install. -- **[Run the site](https://wordpress.github.io/contributor-toolkit/guide/running-the-site)** and debug it: a [debug log tab](https://wordpress.github.io/contributor-toolkit/guide/logs-and-debugging) with fatals surfaced instead of hidden behind the recovery screen, [the database](https://wordpress.github.io/contributor-toolkit/guide/database), [captured mail](https://wordpress.github.io/contributor-toolkit/guide/mail), and [a terminal](https://wordpress.github.io/contributor-toolkit/guide/terminal) using the Node.js runtime the app bundles. +- **[Run the site](https://wordpress.github.io/contributor-toolkit/guide/running-the-site)** and debug it: a [debug log tab](https://wordpress.github.io/contributor-toolkit/guide/logs-and-debugging) with fatals surfaced instead of hidden behind the recovery screen, [the database](https://wordpress.github.io/contributor-toolkit/guide/database), [captured mail](https://wordpress.github.io/contributor-toolkit/guide/mail), [a terminal](https://wordpress.github.io/contributor-toolkit/guide/terminal) using the Node.js runtime the app bundles, and [step debugging with Xdebug](https://wordpress.github.io/contributor-toolkit/guide/step-debugging) in VS Code, Cursor, PhpStorm or Zed. - **[Send the change back](https://wordpress.github.io/contributor-toolkit/guide/submitting-changes)**: [a GitHub pull request](https://wordpress.github.io/contributor-toolkit/guide/submit-github-pr) to `wordpress-develop` or `WordPress/gutenberg`, opened through device sign-in with no credential on disk, [a patch attached to Trac](https://wordpress.github.io/contributor-toolkit/guide/submit-trac) (Core only), or [a patch handed to a mentor](https://wordpress.github.io/contributor-toolkit/guide/submit-mentor) that keeps your name on the work. - **[Keep the site current with trunk](https://wordpress.github.io/contributor-toolkit/guide/trunk-updates)** without recreating it, fetching only what changed. @@ -87,7 +87,6 @@ How the app works from a user's point of view — the toolchain it bundles, keep - Explore bundling MySQL server with the app. - Potentially integrate with Studio to benefit from wp-cli integration and other Studio features. - Resolve conflicts in the app. Branches, commits and pushes are already handled for each work item, but when a work item's branch cannot move onto current trunk, the app still hands it to a mentor. -- Internationalization: the app's interface available in several languages, not only English. ### Download stats diff --git a/docs/guide/applying-patches.md b/docs/guide/applying-patches.md index 91350c5a..bb3e3c01 100644 --- a/docs/guide/applying-patches.md +++ b/docs/guide/applying-patches.md @@ -25,6 +25,8 @@ On a Core site there are two additional patch-file routes: click **or choose a . When you choose a pull request, the preview lists the files changed by its commits and says whether changing checkout requires `npm install`. Nothing has changed yet. +If the ticket or issue you are on has edits, the preview also says where they go before you continue: *Your edits to 1 file stay with ticket #60001 and come back when you revert this PR.* The count is the same one the ticket card shows. If you first tried this pull request from a different ticket or issue, **Revert this PR** returns to that one, so the sentence says the edits *come back when you return to it* instead. On trunk, with nothing linked, there is no sentence. + Click **Apply and rebuild** to continue. The app parks the work on your current ticket or issue, creates or reuses `pr/NNNN`, and checks out the PR's commits exactly as its author wrote them. In a terminal, `git status` now reports `On branch pr/NNNN` and a clean working tree until you make edits of your own. This avoids trying to make an old PR's diff fit today's trunk. It also keeps authorship and commit history visible. A closed PR can still be checked out for investigation; its state does not change what Git has stored. diff --git a/docs/guide/database.md b/docs/guide/database.md index 8197d111..ad4cf7ba 100644 --- a/docs/guide/database.md +++ b/docs/guide/database.md @@ -4,7 +4,7 @@ The dev server runs WordPress on SQLite, and the app bundles [Adminer](https://w ## Opening Adminer -While the dev server is running, a **DB inspect (Adminer)** link appears beside the server URL in the site view, after **wp-admin**. Clicking it opens Adminer in your browser, already logged into the site's SQLite database — no credentials to enter. From there you can browse tables, inspect rows, and run SQL, the same way you would against a MySQL-backed install. +While the dev server is running, a **Database** link appears under **Server** in the site's details, after **wp-admin**. Clicking it opens Adminer in your browser, already logged into the site's SQLite database — no credentials to enter. From there you can browse tables, inspect rows, and run SQL, the same way you would against a MySQL-backed install. Adminer uses the database path recorded by Playground after WordPress initializes, for both Core and Gutenberg sites. This supports randomized storage, legacy fixed paths, and an explicit `DB_PATH`. The path is inside the Playground environment; use Adminer to browse the active database. diff --git a/docs/guide/editors.md b/docs/guide/editors.md index 8c97afe3..8918e4fb 100644 --- a/docs/guide/editors.md +++ b/docs/guide/editors.md @@ -1,40 +1,58 @@ # Opening the site in your editor -The app is not an editor. To change WordPress code you open the site's directory in whatever editor you already use, and the site header gives you one control for that. +The app is not an editor. To change WordPress code you open the site's folder in the editor you already use. The app opens it for you from the **Site actions** menu, and opens a single changed file from the site's details. -![The site view, with the site's path under Local path in the details and the site's menu button at the end of the page's header](/screenshots/site-view.png) +![The site view, with the site's path under Local path in the details and the Site actions menu button at the right end of the header](/screenshots/site-view.png) -## The Open directory in menu +## Choose your code editor -Under the site's path in the header, click **Open directory in**. The menu contains: +In [Settings](./settings), under **General → Applications**, **Code editor** lists the editors the app found on your computer, and **Ask each time**, which is the default. -- The system file manager — **Finder** on macOS, **File Explorer** on Windows, **File manager** on Linux. -- Any editors the app detected on your machine, by name — for example **Visual Studio Code**, **Cursor**, **PhpStorm**, **Sublime Text**, or **Zed**. -- **Other application…** — a picker for choosing any application yourself. +- With an editor chosen, the app opens the site and its files in that editor without asking. +- With **Ask each time**, the app asks which application to use every time. -Choosing an entry opens the site's directory in that application. +The same setting decides which editor's setup the site's details offer for [step debugging](./step-debugging). + +If the editor you chose is uninstalled later, the app asks again until you choose another one. The next time you open Settings, **Code editor** reads **Ask each time** and a notice says the editor is no longer installed. + +Only editors the app found can be chosen. An application you pick with **Other application…** opens the site, but it cannot be saved as the setting. + +## Open in + +Open the **Site actions** menu (⋮) at the right end of the header, or right-click the site in the sidebar. + +- With a code editor chosen in Settings, the menu has one item, **Open in** followed by the editor's name, for example **Open in PhpStorm**. Choose it to open the site's folder in that editor. +- With **Ask each time**, **Open in** opens a second menu. It lists each editor the app found on your computer, by name, and then **Other application…**, which is always last. + +## Changed files + +The **Changed files** section of the site's details lists, as folder trees, the files your work changes and the files an applied patch or pull request changes. Click a file to open it: + +- With a code editor chosen in Settings, the file opens in that editor. +- With **Ask each time**, a menu labelled **Open in** opens next to the file, with the same editors and **Other application…**. Press Escape to close it without opening anything. +- If the app found no editor, the file is shown in your file manager. + +Folders that editors create for their own settings are not listed: `.idea`, `.vscode`, `.vs`, `.fleet`, `.zed` and `.nova`. The app adds them to the site's local Git excludes (`.git/info/exclude`), so they also stay out of your patch. If you remove a rule from that file, the app does not add it again. A file that the project itself tracks in one of these folders, such as Gutenberg's own `.vscode` files, is still listed when you change it. ## How detection works -Detection checks the standard install locations for a short list of common editors: VS Code, Cursor, PhpStorm, Sublime Text, and Zed. It runs each time you open the menu — while it is checking, the menu shows **Looking for applications…** — so an editor you install while the app is running appears the next time you open the menu. +Detection looks in the standard install locations for a short list of common editors: VS Code, Cursor, PhpStorm, Sublime Text, and Zed. It runs when you open a site, open the **Site actions** menu, click a changed file, or open Settings, so an editor you install while the app is running appears the next time you do one of those. While it is still looking, the menu shows **Looking for applications…**. -The list is a shortcut, not a limit. Detection deliberately checks fixed filesystem paths rather than your shell's `PATH` (a packaged desktop app does not inherit it), so it can miss editors installed somewhere unusual — JetBrains standalone installers with version-numbered directories, for instance, or most Linux packaging variants. An editor the list misses is not one the app refuses to use: that is what **Other application…** is for, and it is always in the menu, not only as a fallback. +The list is a shortcut, not a limit. Detection checks fixed install paths rather than your shell's `PATH` (a packaged desktop app does not inherit it), so it can miss editors installed somewhere unusual: JetBrains standalone installers with version-numbered folders, for instance, or most Linux packaging variants. An editor the list misses is not one the app refuses to use: that is what **Other application…** is for. ## Other application… -**Other application…** opens your system's application picker. Choose any application and the site directory is handed to it. This works for any editor, detected or not, and is the reliable path when detection comes up empty. +**Other application…** opens your system's application picker. Choose any application and the site's folder is handed to it. This works for any editor, found or not, and is the reliable path when detection finds nothing. ## Copy path and the file manager -Two related controls sit nearby: - -- The copy icon next to the path in the header copies the site's full path to the clipboard (it briefly shows **Copied!**). Use it to open the directory from an editor's own **Open Folder** dialog or from a terminal. -- The ☰ **More** menu also offers **Copy path** and **Show in Finder** / **Show in Explorer** (**Show in file manager** on Linux), which reveals the directory in the system file manager. +- The **Copy** button next to **Local path** in the details copies the site's full path to the clipboard, and briefly reads **Copied**. Use it to open the folder from an editor's own **Open Folder** dialog or from a terminal. +- The **Site actions** menu also has **Copy path**, and **Show in Finder** / **Show in Explorer** (**Show in file manager** on Linux), which shows the folder in your file manager. ## When an open fails -If an application fails to open the directory — it was uninstalled, or the launch was refused — an inline notice appears directly under the **Open directory in** menu explaining what went wrong. When it makes sense, the notice carries a **Choose application…** button that opens the same picker as **Other application…**, so you can point at a working application without hunting for the menu again. +If an application cannot open the folder or file (it was uninstalled, or the launch was refused), a notice at the top of the site's page says what went wrong. When it can help, the notice has a **Choose application…** button that opens the same picker as **Other application…**, so you can choose an application that works. ## What to edit -The source you edit lives in the site directory: under `src/` on a WordPress Core site, under `packages/` on a Gutenberg site. While the [build watch](./running-the-site#the-build-watch) is running, your edits are rebuilt into `build/` as you save them. It runs on its own control, so it does not need the dev server up. On a WordPress Core site starting the server starts it too; on a built Gutenberg site the server starts without it, so start it yourself when you want `packages/` edits compiled on save. When your change is ready, see [Submitting changes](./submitting-changes). +The source you edit lives in the site's folder: under `src/` on a WordPress Core site, under `packages/` on a Gutenberg site. While the [build watch](./running-the-site#the-build-watch) is running, your edits are rebuilt into `build/` as you save them. It runs on its own control, so it does not need the dev server up. On a WordPress Core site, starting the server starts it too; on a built Gutenberg site the server starts without it, so start it yourself when you want `packages/` edits compiled on save. When your change is ready, see [Submitting changes](./submitting-changes). diff --git a/docs/guide/getting-started.md b/docs/guide/getting-started.md index 5e93b5b5..7369fd0d 100644 --- a/docs/guide/getting-started.md +++ b/docs/guide/getting-started.md @@ -22,14 +22,16 @@ On Contributor Day, open that site and run [**Update to latest trunk**](./trunk- Download the latest build for your platform with the button above, then open the app. +On Linux the button downloads an AppImage. The [Releases page](https://github.com/WordPress/contributor-toolkit/releases/latest) also has a `.deb` for Debian and Ubuntu and an `.rpm` for Fedora, which add the app to your application menu. From the folder you downloaded the file to, run `sudo apt install ./wordpress-contributor-toolkit-X.Y.Z-linux-amd64.deb` or `sudo dnf install ./wordpress-contributor-toolkit-X.Y.Z-linux-x86_64.rpm`, with the version you downloaded in place of `X.Y.Z`. To remove it, run `sudo apt remove wordpress-contributor-toolkit` or `sudo dnf remove wordpress-contributor-toolkit`. + If macOS blocks the app when you first open it, see [Troubleshooting](./troubleshooting#macos-blocks-the-app-from-opening). ## Your first contribution -1. Click **Create a site**, choose a destination folder, and pick what to contribute to: **WordPress Core** (the default) or **Gutenberg**. +1. Click **Create new site** at the top of the sidebar, choose a destination folder, and pick what to contribute to: **WordPress Core** (the default) or **Gutenberg**. 2. Wait. The app downloads the repository, then installs the dependencies and runs the first build on its own — go and get a coffee. See [The setup wizard](./setup-wizard). -3. Click **Start dev server**. -4. A browser window opens automatically. If not, open it by clicking the site URL — or the **wp-admin** link beside it, to go straight to the dashboard. +3. When the checklist reaches its last step, click **Start dev server and finish the wizard**. +4. A browser window opens automatically. If not, click **View site** under **Server** in the site's details, or **wp-admin** to go straight to the dashboard. 5. Give the work a home: link a [Trac ticket](./trac-tickets) on a Core site or a [GitHub issue](./gutenberg-issues) on a Gutenberg site. 6. Make changes to the code — [open the site in your editor](./editors) straight from the app. 7. Click **Review & submit changes** to see a diff of everything you changed. @@ -50,7 +52,7 @@ Every ticket or issue you link gets its own branch inside the site and keeps its ::: ::: tip You never need a new site to get newer code -**Update to latest trunk**, in the ☰ menu at the top right of any site, is available at any time on any site, however old: it fetches the latest trunk, reinstalls dependencies if they changed, and rebuilds. See [Staying up to date with trunk](./trunk-updates). +**Update to latest trunk**, in the **Site actions** menu (⋮) at the right end of any site's header, is available at any time on any site, however old: it fetches the latest trunk, reinstalls dependencies if they changed, and rebuilds. See [Staying up to date with trunk](./trunk-updates). ::: ## How it works under the hood diff --git a/docs/guide/gutenberg-issues.md b/docs/guide/gutenberg-issues.md index ca146cf3..d69f29c0 100644 --- a/docs/guide/gutenberg-issues.md +++ b/docs/guide/gutenberg-issues.md @@ -10,7 +10,7 @@ Every Gutenberg change starts on a GitHub issue. The **GitHub issue** card links ## Link an issue -1. Type the issue number or paste its URL (for example `71234` or `https://github.com/WordPress/gutenberg/issues/71234`) into the field. A comment anchor or a query on the pasted URL is fine. +1. Type the issue number or paste its URL (for example `71210` or `https://github.com/WordPress/gutenberg/issues/71210`) into the field. A comment anchor or a query on the pasted URL is fine. 2. Click **Link issue**. The issue is stored with the site, so it survives restarts. You can change or remove it at any time. @@ -21,11 +21,11 @@ A pull request's bare number is refused too. GitHub numbers issues and pull requ ![The GitHub issue card refusing pull request #86733 and offering a Link #47401 button for the issue it fixes](/screenshots/gutenberg-pull-request-refused.png) -If GitHub cannot be reached, the number is linked as typed. +If GitHub cannot be reached, or its [rate limit](./trac-tickets#linked-pull-requests) is spent, the number is linked as typed, and the app log says why. If you do not have an issue yet, click **Not sure yet? Browse good first issues on GitHub** to open the `Good First Issue` list in your browser. -Linking an issue gives it its own branch inside the site, named `issue/71234`, so the work you do for it is kept apart from every other issue on that site. Everything in [Working on several tickets](./ticket-branches) applies, with *issue* for *ticket*: switching, parking, the **Your issues on this site** card, the update to the current trunk, and the four choices for edits made before linking. +Linking an issue gives it its own branch inside the site, named `issue/71210`, so the work you do for it is kept apart from every other issue on that site. Everything in [Working on several tickets](./ticket-branches) applies, with *issue* for *ticket*: switching, parking, the **Your issues on this site** card, the update to the current trunk, and the four choices for edits made before linking. Once an issue is linked, the card shows its number with these actions: @@ -36,11 +36,11 @@ There is no **Read details** action here: an issue's title, labels and state are ## Linked pull requests -The card searches GitHub for pull requests on `WordPress/gutenberg` that are *for* this issue, the way GitHub itself links the two: a closing keyword in front of the number or the issue's URL in the pull request's description (`Fixes #71234`, `Closes WordPress/gutenberg#71234`, `Resolves https://github.com/WordPress/gutenberg/issues/71234`). A number or a URL mentioned in passing does not count, on GitHub or here. The list is the same one the issue page shows under *linked pull requests*. +The card searches GitHub for pull requests on `WordPress/gutenberg` that are *for* this issue, the way GitHub itself links the two: a closing keyword in front of the number or the issue's URL in the pull request's description (`Fixes #71210`, `Closes WordPress/gutenberg#71210`, `Resolves https://github.com/WordPress/gutenberg/issues/71210`). A number or a URL mentioned in passing does not count, on GitHub or here. The list is the same one the issue page shows under *linked pull requests*. Each row shows the pull request number (click it to open it in your browser), its title, its state and a date labelled with what it is, exactly as on a Core site; see [Linked pull requests](./trac-tickets#linked-pull-requests) for the pills, the **Latest** mark and the rate limit. Merged is common here, unlike on `wordpress-develop`: a Gutenberg pull request lands by being merged. -Each pull request has an **Apply…** button, which fetches its commits and checks out its own `pr/NNNN` branch after a file preview; see [Applying patches and PRs](./applying-patches). Any other pull request on `WordPress/gutenberg` can be pasted by URL or number into the **Check out a pull request** card. +Each pull request has an **Apply…** button, which fetches its commits and checks out its own `pr/NNNN` branch after a file preview; see [Applying patches and PRs](./applying-patches). Any other pull request on `WordPress/gutenberg` can be pasted by URL or number into the **Check out a pull request** card, for example `71234`. ## What a Gutenberg site does not have diff --git a/docs/guide/mail.md b/docs/guide/mail.md index 7ce748e5..3cb47feb 100644 --- a/docs/guide/mail.md +++ b/docs/guide/mail.md @@ -1,18 +1,18 @@ -# The Mail panel +# Email -WordPress sends email constantly — new user notifications, password resets, comment moderation. On a development site none of that should reach a real inbox, and with this app none of it can: each site gets its own built-in SMTP catcher, listening only on `127.0.0.1`. WordPress's `wp_mail()` is pointed at it, so every email the site sends lands in the **Mail** panel instead of leaving your machine. +WordPress sends email constantly — new user notifications, password resets, comment moderation. On a development site none of that should reach a real inbox, and with this app none of it can: each site gets its own built-in SMTP catcher, listening only on `127.0.0.1`. WordPress's `wp_mail()` is pointed at it, so every email the site sends lands in the app instead of leaving your machine. Click **Email** at the bottom of the window to open the list. -![A captured email with its time, sender, and subject](/screenshots/mail-panel.png) +![The Email tray with one captured email, showing its time, sender and subject, a Clear emails button, and SMTP listening on 127.0.0.1 at the foot](/screenshots/mail-panel.png) ## How it works -The SMTP catcher starts and stops together with the dev server. While the server is running, the panel shows the address it listens on, for example `SMTP listening on 127.0.0.1:54321` — the port is assigned by the operating system, so it varies. Before the server has started, the panel says `SMTP will start with the dev server.` +The SMTP catcher starts and stops together with the dev server. While the server is running, the foot of the tray shows the address it listens on, for example `SMTP listening on 127.0.0.1:54321` — the port is assigned by the operating system, so it varies. Before the server has started, it says `SMTP will start with the dev server.` No configuration is needed on the WordPress side: the app installs a small must-use plugin in the Playground environment that routes `wp_mail()` through SMTP to the catcher. ## Reading emails -Captured emails appear in a list showing the date, the sender, and the subject. Click an email (or press Enter on it) to open it in a full-screen viewer with the **From**, **To**, **CC**, and **Date** headers and two tabs: +Captured emails appear in a list showing the date, the sender, and the subject. Click an email (or press Enter on it) to open it in a viewer with the **From**, **To**, **CC**, and **Date** headers and two tabs: - **Rendered** — the HTML body as a mail client would show it, or the plain-text body if the email has no HTML part. - **Raw** — the raw message source, headers and all. Useful when the bug you are chasing is in how core builds the email itself. @@ -21,4 +21,4 @@ Captured emails appear in a list showing the date, the sender, and the subject. ## Trying it out -Trigger any email-sending flow on the dev site — the password reset form at `/wp-login.php?action=lostpassword` is the quickest — and the email appears in the panel. See [Running the site](./running-the-site) for starting the server. +Trigger any email-sending flow on the dev site — the password reset form at `/wp-login.php?action=lostpassword` is the quickest — and the email appears in the list. See [Running the site](./running-the-site) for starting the server. diff --git a/docs/guide/managing-sites.md b/docs/guide/managing-sites.md index b023f40c..23bf89db 100644 --- a/docs/guide/managing-sites.md +++ b/docs/guide/managing-sites.md @@ -1,27 +1,39 @@ # Managing sites -Everything about a site's identity and lifecycle lives in its header: the name, a few status badges, the path, and the **More** menu (☰) at the top right. +A site's page has its name and project tag in the header at the top, and its facts in the **Details** column on the right. Everything you do to the site as a whole is in the **Site actions** menu (⋮), at the right end of the header. -![The site header with the More menu open](/screenshots/site-menu.png) +![A site's page with the Site actions menu open: Rename…, Copy path, Show in Finder, Update to latest trunk, Open in and Delete site](/screenshots/site-menu.png) -## The site header +## The details -- **Rename** — click the pencil icon next to the site title to give the site a different display name. This changes the label in the app only; the directory on disk keeps its name. -- **Status badge** — **INITIALIZED** once the repository is cloned; **UNINITIALIZED** before that. -- **Created date** — when the site was created. -- **Trunk age** — how old the site's snapshot of trunk is. When the snapshot gets stale, an amber dot appears next to the label; hover it to see the age in days. See [Staying up to date with trunk](./trunk-updates). -- **Path** — the site's directory, with a copy button next to it. The **Open directory in** menu underneath opens it in your file manager or an editor; see [Editors](./editors). +The **Details** column lists: -## The More menu +- **Setup**: **Initialized** once the site's dependencies are installed, and **Uninitialized** before that. +- **Created**: when the site was created. +- **Trunk as of**: the date of the site's copy of trunk. When it gets old, a coloured dot appears next to the site in the sidebar. See [Staying up to date with trunk](./trunk-updates). +- **Local path**: the site's folder, with a **Copy** button. +- **Checkout**: the project and the PHP version the server runs. +- **Debugging**: which debug settings are on. See [Settings](./settings). +Under them are the **Server** and **Build watch** sections; see [Running the site](./running-the-site). Last comes **Changed files**: the files your work and any applied patch or pull request change. See [Editors](./editors#changed-files). -The ☰ menu at the top right of the site view contains: +## The Site actions menu -- **Copy path** — puts the site's directory path on the clipboard. -- **Show in Finder** (macOS) / **Show in Explorer** (Windows) — reveals the directory in your file manager. -- **Update to latest trunk** — fetches the latest trunk of the site's repository and rebuilds. Also reachable from the staleness notice; on an already-fresh site it just prints "Already up to date." See [Staying up to date with trunk](./trunk-updates). -- **Delete this site** — removes the site from the list **and deletes its directory from disk**. This cannot be undone. The app will only ever delete a directory it has on record as a site — never an arbitrary path. It takes every ticket's or issue's work in the site with it; to throw away one work item and keep the rest, use its **Delete this … work** action instead — see [Deleting a work item's changes](./ticket-branches#deleting-a-work-item-s-changes). +Open it with the ⋮ button at the right end of the header. It contains: -**Delete** asks for confirmation first. +- **Rename…**: gives the site a different display name. This changes the name in the app only; the folder on disk keeps its name. +- **Copy path**: puts the site's folder path on the clipboard. +- **Show in Finder** (macOS) / **Show in Explorer** (Windows) / **Show in file manager** (Linux): shows the folder in your file manager. +- **Update to latest trunk**: fetches the latest trunk of the site's repository and rebuilds. Also reachable from the notice on an old site; on a site that is already current it prints "Already up to date." See [Staying up to date with trunk](./trunk-updates). +- **Open in**: opens the site's folder in an editor. See [Editors](./editors). +- **Delete site**: removes the site from the list **and deletes its folder from disk**. This cannot be undone. The app only deletes a folder it has on record as a site, never another path. It takes every ticket's or issue's work in the site with it; to throw away one work item and keep the rest, use its **Delete this … work** action instead. See [Deleting a work item's changes](./ticket-branches#deleting-a-work-item-s-changes). + +**Delete site** asks for confirmation first. + +## The menu on a site in the sidebar + +Right-click a site in the sidebar to open the same **Site actions** menu for that site. You can also select the site with the keyboard and press Shift+F10 or the Menu key. The menu acts on the site you right-clicked, and the site that is open stays open. For example, **Copy path** copies the path of the site you right-clicked. + +Press Escape or click outside the menu to close it. ## Updating with uncommitted changes @@ -36,6 +48,6 @@ Work that is already parked on a ticket or issue branch is never what this dialo ## Sites created by an earlier version -A site created before the app shipped its own Git shows a red banner at the top of its card: "This site was created by an earlier version of the app." The app now clones sites with the Git it bundles, and the shallow clones the old engine made cannot be written safely by it, so linking tickets, applying patches, discarding changes and updating trunk are refused on that site. Reading still works: the ticket panel and the patch export show what is there. The way out is the banner's **Create site** button: export your work as a patch, create a new site, apply the patch there, then delete the old site from its More menu. +A site created before the app shipped its own Git shows a red banner at the top of its card: "This site was created by an earlier version of the app." The app now clones sites with the Git it bundles, and the shallow clones the old engine made cannot be written safely by it, so linking tickets, applying patches, discarding changes and updating trunk are refused on that site. Reading still works: the ticket panel and the patch export show what is there. The way out is the banner's **Create site** button: export your work as a patch, create a new site, apply the patch there, then delete the old site with **Delete site** in its **Site actions** menu. The export covers the ticket that is currently linked. Work parked on another ticket's branch in that site cannot be reached without switching to it, and switching is one of the refused actions, so it stays in the old site's repository. A Git client can still read it there (`git log ticket/`) if you need it back. diff --git a/docs/guide/running-the-site.md b/docs/guide/running-the-site.md index c0560f2c..d1c92318 100644 --- a/docs/guide/running-the-site.md +++ b/docs/guide/running-the-site.md @@ -1,31 +1,37 @@ # Running the site -Once the [setup wizard](./setup-wizard) is complete, the site view shows a **Start dev server** button. This starts a local WordPress that runs your site's code, so you can see your changes running: for a WordPress Core site, the WordPress built into its `build/` directory; for a Gutenberg site, a stock WordPress with your checkout as its Gutenberg plugin. +Once the [setup wizard](./setup-wizard) is complete, you can start the site's development server. It starts a local WordPress that runs your site's code, so you can see your changes running: for a WordPress Core site, the WordPress built into its `build/` directory; for a Gutenberg site, a stock WordPress with your checkout as its Gutenberg plugin. ![The site view, with the server's and the build watch's menus and Review & submit changes in the page's header, and a Start button beside Server and beside Build watch in the details](/screenshots/site-view.png) ## Start and stop -Click **Start dev server**. The button cycles through three states: +There are two places to start the server: -- **Start dev server** — nothing is running. -- **Starting dev server...** — the server is booting. A "Dev server is starting…" line below the button shows the elapsed time. -- **Stop dev server** — the server is up. The button shows a red dot; clicking it stops the server. +- In the site's details, click **Start** next to **Server**. +- In the header, open the server's menu (the first dot with a chevron) and choose **Start development server**. -When the server is ready, its URL appears below the button, for example `http://127.0.0.1:/`, with a **wp-admin** link beside it. Click either to open the site in your default browser. +The server's dot shows its state, in the header and next to the site in the sidebar: + +- Grey: **Server stopped**. +- Amber: **Server starting…**. The details show how long it has been starting, and **Cancel** stops the start. +- Green: **Server running**. **Stop** in the details, or **Stop development server** in the menu, stops it. +- Red: the server stopped by itself or could not start. Its last lines are in the **Server** tab of the [Logs](./logs-and-debugging). + +When the server is running, the details list **View site**, **wp-admin** and **Database** under **Server**, with the admin username and password. The header's server menu has **View site** and **wp-admin** too. Each opens in your default browser. ![The site view with the dev server running: in the details, under Server, a Stop button, the View site, wp-admin and Database links, and the admin credentials with the password hidden](/screenshots/dev-server-running.png) -The button is disabled while a trunk update is running, and while `npm run build` is running, whether you typed it in the terminal or a patch, a pull request or a trunk update started it: the server would serve a `build/` that is still being written. A site set to start its server or watch when opened waits for that build to end. The reverse is no longer true: an update can run with the server up, because it pauses the build watch for the rebuild and leaves the server serving — see [Applying patches and PRs](./applying-patches) and [Staying up to date with trunk](./trunk-updates). +**Start** is disabled while a trunk update is running, and while `npm run build` is running, whether you typed it in the terminal or a patch, a pull request or a trunk update started it: the server would serve a `build/` that is still being written. A site set to start its server or watch when opened waits for that build to end. The reverse is no longer true: an update can run with the server up, because it pauses the build watch for the rebuild and leaves the server serving — see [Applying patches and PRs](./applying-patches) and [Staying up to date with trunk](./trunk-updates). ## Logging in -Every site uses the same credentials, shown next to the URL: +Every site uses the same credentials, shown under **Server** in the details: - Username: `admin` - Password: `password` -The **wp-admin** link next to the site URL opens the dashboard directly. It appears in both places the URL does: the [setup checklist](./setup-wizard) step and the site page. +The **wp-admin** link opens the dashboard directly. ## What the dev server actually runs @@ -39,7 +45,7 @@ The dev server is not a stub — it is WordPress Playground running your checkou ## The build watch -The build watcher compiles what you edit into what the server actually serves: `src/` into `build/` on a WordPress Core site, the packages into their `build/` directories on a Gutenberg site, where the watcher is Gutenberg's own `npm run dev` and rebuilds everything once before it starts watching. It has its own **Start build watch** button next to the dev-server button, and its own status dot: +The build watcher compiles what you edit into what the server actually serves: `src/` into `build/` on a WordPress Core site, the packages into their `build/` directories on a Gutenberg site, where the watcher is Gutenberg's own `npm run dev` and rebuilds everything once before it starts watching. It has its own **Start** button under **Build watch** in the details, its own menu in the header with **Start build watch**, and its own status dot: | Dot | State | | --- | --- | @@ -60,9 +66,9 @@ While the watch is running, applying a patch, switching work items or updating t Its output goes to its own **Build watcher** log tab, not to the terminal, and it no longer holds the terminal's "running" lock — so the terminal and one-shot actions stay available while it runs. -## DB inspect (Adminer) +## The database -While the server is running, a **DB inspect (Adminer)** link joins the site URL and **wp-admin** on the same row. It opens Adminer, a database browser, against the site's SQLite database — useful for inspecting what a code change wrote. See [Database](./database) for details. +While the server is running, a **Database** link joins **View site** and **wp-admin**. It opens Adminer, a database browser, against the site's SQLite database — useful for inspecting what a code change wrote. See [Database](./database) for details. The link disappears when the server stops, because there is no database to connect to. diff --git a/docs/guide/settings.md b/docs/guide/settings.md index 34ca1878..8c3c040b 100644 --- a/docs/guide/settings.md +++ b/docs/guide/settings.md @@ -2,12 +2,15 @@ The app's settings are in one dialog, opened from the cog at the bottom right of the window, or from the menu: **Settings…** in the application menu on macOS (⌘,), under **File** on Windows and Linux (Ctrl+,). A setting applies to every site and is kept between launches. +![The Settings dialog on its General tab: Theme with Light, Dark, System and Custom, Language, the two settings for starting the server and the build watch when a site opens, what happens to running servers and build watches on quit, Code editor set to Ask each time, and New sites go here](/screenshots/settings-dialog.png) + ## General - **Theme** — light, dark, whatever your operating system is set to, which is the default, or custom: a background and a primary colour of your own, typed as hex or picked from the swatch, from which the app builds every other colour. A change applies as you make it, to the whole window; nothing running is touched. The dialog says if some text may be hard to read on the colours you chose; they are kept all the same. - **Language** — which language the app is shown in: your system's language, which is the default, or one of the languages the app has a translation for. A change applies after a relaunch, which the dialog offers; relaunching stops running servers and builds, as quitting does. Translations come from [translate.wordpress.org](https://translate.wordpress.org/projects/meta/contributor-toolkit/) and ship with the app once they are mostly complete, so the list grows from release to release. - **Start the server when I open a site** and **Start the build watch when I open a site** — off unless you turn them on. On, opening a site that is set up starts its [development server](./running-the-site), its build watch, or both, as it would if you pressed Start; on WordPress Core the server's start brings the watch with it. Nothing starts for a site whose setup, update or deletion is under way, and nothing already running is started again. - **When I quit, running servers and build watches** — quitting always stops them, as it always has. **Stop them, and start them again next time** remembers which sites had a server or a watch running and starts them again when the app next opens, whichever site it opens on. +- **Code editor**: the editor the app opens a site and its changed files in, from the editors it found on your computer, or **Ask each time**, which is the default. See [Opening the site in your editor](./editors#choose-your-code-editor). - **New sites go here** — the folder new sites are created in, each in a subfolder of its own. With one set, the [create-site dialog](./creating-a-site) starts on it; you can still pick another folder for one site without changing the setting. **Forget this folder** clears it, and the dialog goes back to asking each time. A folder that no longer exists is refused when you choose it. ## Sites diff --git a/docs/guide/setup-wizard.md b/docs/guide/setup-wizard.md index 4e0fec20..d0d21332 100644 --- a/docs/guide/setup-wizard.md +++ b/docs/guide/setup-wizard.md @@ -14,27 +14,30 @@ The clone of the project's repository that started when you created the site. It `npm install`, run on the Node.js runtime bundled with the app — no system Node or npm is needed. It starts by itself when the clone ends, and the terminal says so: *Setting this site up — running npm install…* -If it fails, the chain stops there and the button changes to **Retry npm install**; a leftover `node_modules` folder from a failed run does not count as completed. Once installed, the button reads **Dependencies installed** and stays disabled. If you later add a dependency to `package.json`, run `npm install` yourself in the [Terminal](./terminal). +If it fails, the chain stops there, the step reads **Failed**, and the button changes to **Retry npm install**; a leftover `node_modules` folder from a failed run does not count as completed. Once installed, the button reads **Dependencies installed** and stays disabled. If you later add a dependency to `package.json`, run `npm install` yourself in the [Terminal](./terminal). ### 3. Run full build Runs the project's full build and generates the files the dev server serves. A Core site compiles `src/` into `build/`; a Gutenberg site builds the plugin's packages. This is the longest step after the clone, and it follows the install without asking. +If it fails, the step reads **Failed** and the button changes to **Retry the build**. The app remembers a failed build, so the step still reads **Failed** after you quit and reopen the app, and **Start dev server and finish the wizard** stays disabled until a build succeeds. + You never run it manually unless something failed: [trunk updates](./trunk-updates) and [applied patches or pull requests](./applying-patches) rebuild on their own, and while the [build watch](./running-the-site#the-build-watch) is running your edits are compiled as you save them. ### 4. Start dev server & finish wizard -Click **Start dev server and finish the wizard** to launch the WordPress dev server for the first time. This completes the checklist and permanently replaces it with the compact action bar described below. The server URL, and a **wp-admin** link beside it, appear next to the button once it is up — see [Running the site](./running-the-site). On a Gutenberg site the server starts on the build step 3 just produced, without the [build watch](./running-the-site#the-build-watch); start that yourself when you want your edits compiled on save. +Click **Start dev server and finish the wizard** to launch the WordPress dev server for the first time. This completes the checklist and replaces it, for good, with the site's usual page: the server and build watch controls in the header and in the site's details, and **Review & submit changes**. Once it is up, **View site** and **wp-admin** links appear under **Server** in the site's details. See [Running the site](./running-the-site). On a Gutenberg site the server starts on the build step 3 just produced, without the [build watch](./running-the-site#the-build-watch); start that yourself when you want your edits compiled on save. ## Stopping the chain -Press **Ctrl+C** in the [Terminal](./terminal) to stop setup, including a running `npm install`. The terminal says where you stand — *Setup stopped. The remaining steps are in the checklist above — run them whenever you are ready* — and the checklist buttons take over from there. The chain names its other endings too: setup complete, the install failed, or the build failed with dependencies already installed. +While setup runs by itself, a banner above the steps reads *Setting this site up for you — step N of 3*. Click **Stop setup** in the banner, or press **Ctrl+C** in the [Terminal](./terminal), to stop setup, including a running `npm install`. The terminal says where you stand — *Setup stopped. The remaining steps are in the checklist above — run them whenever you are ready* — and the checklist buttons take over from there. The chain names its other endings too: setup complete, the install failed, or the build failed with dependencies already installed. ## Step states Each step carries a state label: - **Completed** — done, marked with a green check. +- **Failed**: the step ran and did not finish. Its output is in the Terminal, and its button retries it. - **In progress** — this step is running right now. - **Ready** — the next step to do, waiting on you rather than working. The distinction matters: a step that said "In progress" while nothing was installing invited you to wait instead of to click. - **Pending** — ready but waiting for you to reach it. @@ -46,6 +49,6 @@ Steps also lock temporarily while a [trunk update](./trunk-updates) is running, ## Skipping the wizard -Below the checklist is a **Skip initialization wizard** link. Clicking it hides the checklist for this site, for good, and shows the compact action bar instead: the dev server start/stop button, the [build watch](./running-the-site#the-build-watch) button, and **Review & submit changes**. While the server is running, the site URL, **wp-admin** and **DB inspect (Adminer)** appear on a row below it. +Below the checklist is a **Skip initialization wizard** link. Clicking it hides the checklist for this site, for good, and shows the site's usual page instead: the dev server and [build watch](./running-the-site#the-build-watch) controls, and **Review & submit changes**. While the server is running, **View site**, **wp-admin** and **Database** appear under **Server** in the site's details. -Skipping does not run any of the steps for you. If the dependencies were never installed or the build never ran, the dev server will not have anything to serve, so only skip on a site you know is already set up (for example, a `wordpress-develop` or `gutenberg` checkout you prepared outside the app). For everything else, finishing step 4 gets you to the same action bar with the work actually done. +Skipping does not run any of the steps for you. If the dependencies were never installed or the build never ran, the dev server will not have anything to serve, so only skip on a site you know is already set up (for example, a `wordpress-develop` or `gutenberg` checkout you prepared outside the app). For everything else, finishing step 4 gets you to the same page with the work actually done. diff --git a/docs/guide/step-debugging.md b/docs/guide/step-debugging.md index 232f40c5..cd3fae7c 100644 --- a/docs/guide/step-debugging.md +++ b/docs/guide/step-debugging.md @@ -12,6 +12,8 @@ This is a proof of concept. It has setup for VS Code, Cursor, PhpStorm and Zed, The **Debugging** row of the site's details then names *Xdebug*, and while the server runs with it, a **Set up Xdebug for your editor** menu sits under the row. If the row says *Restart the server to use it* instead, the server started before you turned the setting on. +![The site's details with the Debugging row reading WP_DEBUG · SCRIPT_DEBUG · Xdebug, and the Set up Xdebug for your editor menu open under it, listing VS Code and PhpStorm](/screenshots/xdebug-setup-menu.png) + The menu lists the editors the app finds on your computer that it has setup for. If it finds none of them, there is no menu. The app looks in each editor's usual install location, so it can miss one installed elsewhere, such as PhpStorm from JetBrains' own installer on Windows. Sublime Text has no setup: its PHP debugger needs Node.js installed on your computer. If you chose one of these editors as your **Code editor** on the **General** tab of **Settings**, and the app finds it, the button is named for it instead, such as **Set up Xdebug for Zed**, and opens that editor's setup without the menu. In the steps below, select that button where they say to choose your editor from the menu. To set up a different editor, change the **Code editor** setting, or set it to **Ask each time** to have the menu back. diff --git a/docs/guide/submit-mentor.md b/docs/guide/submit-mentor.md index 3660fa84..7fcbf65e 100644 --- a/docs/guide/submit-mentor.md +++ b/docs/guide/submit-mentor.md @@ -24,7 +24,7 @@ Click **Save patch as your-username**. The app saves a patch file that carries i # Generated: 2026-08-10 ``` -On a Gutenberg site, the work-item line is `# Issue: https://github.com/WordPress/gutenberg/issues/71234`, using the linked issue's number. Core sites keep the Trac ticket line shown above. +On a Gutenberg site, the work-item line is `# Issue: https://github.com/WordPress/gutenberg/issues/71210`, using the linked issue's number. Core sites keep the Trac ticket line shown above. The header says who made the patch, at which event, for which ticket or issue, against which trunk revision, and when. A field the app does not know is left out rather than written as "unknown", so a mentor can trust the lines that are there. The `#` lines are ignored by `git apply`, `patch`, and Trac's own tooling, so the file applies exactly like a plain diff. diff --git a/docs/guide/terminal.md b/docs/guide/terminal.md index e622c776..e48f757f 100644 --- a/docs/guide/terminal.md +++ b/docs/guide/terminal.md @@ -1,8 +1,8 @@ -# The Terminal panel +# The terminal -Each site view includes an embedded terminal. It is not a general-purpose shell: it accepts a small, fixed set of commands, all of which run in the site's directory using the Node.js runtime bundled with the app. This is enough to rebuild the site after editing code — the reason the panel exists — without requiring Node or npm on your machine. +Each site has a terminal: click **Terminal** at the bottom of the window to open it. It is not a general-purpose shell: it accepts a small, fixed set of commands, all of which run in the site's directory using the Node.js runtime bundled with the app. This is enough to rebuild the site after editing code — the reason the terminal exists — without requiring Node or npm on your machine. -![The Terminal panel with the command hints below it](/screenshots/terminal.png) +![The Terminal tray with the help text and the command hints below it](/screenshots/terminal.png) ## Supported commands @@ -25,7 +25,7 @@ The [setup wizard](./setup-wizard) runs `npm install` and `npm run build` once, - **Edited files in `src/`?** Run `npm run build` so the site picks them up. On a Gutenberg site the hint names `packages/` instead. - **Added a dependency to `package.json`?** Run `npm install`. -Once the site has been built, these two hints appear directly under the terminal. While the [build watch](./running-the-site#the-build-watch) is running, the first is done for you as you save. The command in each hint is a link: clicking it types the command into the terminal for you, ready to run — it does not execute it. While a command is running the hints stop being links and show as plain text, so there is nothing to click until it finishes. +Once the site has been built, these two hints appear directly under the terminal, with a reminder that `help` lists the commands and Ctrl+C stops the current one. While the [build watch](./running-the-site#the-build-watch) is running, the first is done for you as you save. The command in each hint is a link: clicking it types the command into the terminal for you, ready to run — it does not execute it. While a command is running the hints stop being links and show as plain text, so there is nothing to click until it finishes. ::: warning Do not run `npm run watch` It looks like the way to rebuild continuously, and it is a trap. `wordpress-develop`'s Gruntfile renames the real watch task to `_watch` and leaves a `watch` wrapper that runs a **full production build first** — tens of minutes with nothing to show for it, and 30+ on a Windows VM. diff --git a/docs/guide/ticket-branches.md b/docs/guide/ticket-branches.md index 84fe0097..edc5e134 100644 --- a/docs/guide/ticket-branches.md +++ b/docs/guide/ticket-branches.md @@ -125,11 +125,15 @@ A patch is everything on the current work item's branch since the point it was c That last point has a consequence worth knowing. A work-item branch keeps the snapshot of trunk it was born on, even after you [update the site to the latest trunk](./trunk-updates). The patch stays correct against that snapshot, which keeps it free of upstream changes you did not write — but a branch you started weeks ago may no longer apply to today's trunk. Use the card's **Update this … to the current trunk** action when you need a fresh base, then follow the guidance for your project above if it cannot proceed; the app does not replay the branch onto it silently. +## Pull requests and your work item + +Applying a pull request also moves your edits out of the checkout. They stay with the work item, and the pull request's preview says so before you apply it; see [Preview a pull request](./applying-patches#preview-a-pull-request). + +If a PR is applied when you unlink a work item or switch to another one, returning to that item restores the same local PR copy, including your edits. This also survives restarting the app. Use **Revert this PR** to return to your own work and stop reopening that PR automatically. + ## Next steps - [Working on a Trac ticket](./trac-tickets) - [Working on a GitHub issue](./gutenberg-issues) - [Submitting your changes](./submitting-changes) - [Staying up to date with trunk](./trunk-updates) - -If a PR is applied when you unlink a work item or switch to another one, returning to that item restores the same local PR copy, including your edits. This also survives restarting the app. Use **Revert this PR** to return to your own work and stop reopening that PR automatically. diff --git a/docs/guide/trac-tickets.md b/docs/guide/trac-tickets.md index af6912b7..5356ae04 100644 --- a/docs/guide/trac-tickets.md +++ b/docs/guide/trac-tickets.md @@ -63,7 +63,7 @@ The panel searches GitHub for pull requests on `WordPress/wordpress-develop` tha The pull requests and the Trac attachments below are shown the same way, newest first. With nothing applied, each list shows its newest at the top, which is the one marked **Latest** when the ticket's latest patch is in that list. Once a pull request or a patch is applied, it is the only one shown, in a green box in its own list, and the newest are no longer pinned. Everything else is folded away under headings that count it: **Other open PRs** and **Closed PRs** (or **Open PRs** and **Other closed PRs** when the one shown is closed; merged counts as closed), and **Other attachments**, or **Attachments** when none is shown above. Click a heading to open its group or fold it again. -![The ticket card's two lists: an open and a closed linked pull request, and a patch attached on Trac, each with an Apply… button](/screenshots/linked-pull-requests.png) +![The ticket card's two lists: the open pull request marked Latest, the Closed PR (1) group opened to show a closed one, and a patch attached on Trac, each with an Apply… button](/screenshots/linked-pull-requests.png) The state is a coloured pill, in GitHub's own three colours: green **OPEN**, purple **MERGED**, red **CLOSED**. Red here is a label and not a warning — a closed pull request is an outcome, not a failure. Merged is rare on `wordpress-develop`, where a pull request is opened for review and the change usually lands as a commit instead. diff --git a/docs/guide/troubleshooting.md b/docs/guide/troubleshooting.md index 58c4d882..dd8705e2 100644 --- a/docs/guide/troubleshooting.md +++ b/docs/guide/troubleshooting.md @@ -60,9 +60,9 @@ If the start fails: Two different logs, two different problems: -- **The site's PHP log** — the **debug.log** tab in the site view. PHP notices, warnings, and fatals from WordPress and your code. See [Logs and debugging](./logs-and-debugging). +- **The site's PHP log** — the **debug.log** tab in **Logs**, at the bottom of the window. PHP notices, warnings, and fatals from WordPress and your code. See [Logs and debugging](./logs-and-debugging). - **The app's own log** — menu **Help → Open App Log**, or **Help → Show Logs Folder** to reveal the directory. Server starts, installs, git operations, and app errors. When reporting a bug in the app, attach this file. ## Reporting a problem -The **Share feedback** button at the top of the sidebar opens a short form. Responses go into a shared form the team reviews regularly, and submissions are anonymous unless you add your email. For bugs, the [GitHub issue tracker](https://github.com/WordPress/contributor-toolkit/issues) works too — include the app log and, for site problems, the debug.log contents (the **Copy** button under the pane exists for exactly this). +**Give feedback**, at the bottom right of the window, links to a short form. Responses go into a shared form the team reviews regularly, and submissions are anonymous unless you add your email. For bugs, the [GitHub issue tracker](https://github.com/WordPress/contributor-toolkit/issues) works too — include the app log and, for site problems, the debug.log contents (the **Copy** button under the pane exists for exactly this). diff --git a/docs/guide/trunk-updates.md b/docs/guide/trunk-updates.md index 5c3db4db..1733d930 100644 --- a/docs/guide/trunk-updates.md +++ b/docs/guide/trunk-updates.md @@ -6,9 +6,9 @@ The header of each site shows which snapshot it currently holds — for example ## Update to latest trunk -**Update to latest trunk** lives in the ☰ **More** menu at the top right of any site. It brings an existing site up to the current trunk: it fetches the newest commits, reinstalls dependencies if `package-lock.json` moved, and rebuilds. +**Update to latest trunk** is in the **Site actions** menu (⋮) at the right end of any site's header, and in the menu you get by right-clicking a site in the sidebar. It brings an existing site up to the current trunk: it fetches the newest commits, reinstalls dependencies if `package-lock.json` moved, and rebuilds. -![The More menu with Update to latest trunk](/screenshots/site-menu.png) +![The Site actions menu open, with Update to latest trunk among its items](/screenshots/site-menu.png) This option is always there — on every site, at any time, no matter how old or new the snapshot is and whether or not the app has flagged it as stale. If nothing has moved, you simply get "Already up to date." in the terminal. @@ -16,7 +16,7 @@ The update fetches from the site's own `origin` remote. A site the app created p You no longer have to stop the dev server first. The update pauses the [build watch](./running-the-site#the-build-watch) for the reset and resumes it afterwards, and the PHP server keeps serving throughout. -What it will not run alongside is another update, install or build. While one is running, the ☰ menu entry is greyed out and says which under its name ("Wait for the build to finish."), and it comes back as soon as that ends. The **Update to latest trunk** button in the staleness notice is held the same way during an install or a build, with the same sentence as its tooltip; during an update the notice gives way to the progress card. +What it will not run alongside is another update, install or build. While one is running, the menu item is greyed out and says which under its name ("Wait for the build to finish."), and it comes back as soon as that ends. The **Update to latest trunk** button in the staleness notice is held the same way during an install or a build, with the same sentence as its tooltip; during an update the notice gives way to the progress card. ## What an update runs @@ -53,6 +53,8 @@ The app flags sites that have fallen behind with a coloured dot next to the site If the fetch succeeds but install or build fails, the site view shows a red banner: **Update incomplete** — the code is new but the built assets are old, and the site may not run correctly until install and build succeed. Click **Retry install & build** to run only the missing steps; the fetch is not repeated. The sidebar dot stays red until this succeeds. +Every branch of a site shares one install and one build, so the banner shows on trunk and on every ticket until the retry succeeds, including after you link a ticket and take your edits into it. One successful retry clears it everywhere. + ![The Update incomplete notice with its Retry install and build button](/screenshots/update-incomplete.png) ## Staleness is judged locally diff --git a/docs/public/screenshots/apply-patch-conflict.png b/docs/public/screenshots/apply-patch-conflict.png index d7b3a0f0..73c81abf 100644 Binary files a/docs/public/screenshots/apply-patch-conflict.png and b/docs/public/screenshots/apply-patch-conflict.png differ diff --git a/docs/public/screenshots/apply-patch-panel.png b/docs/public/screenshots/apply-patch-panel.png index e7d290b1..ae7a9ca9 100644 Binary files a/docs/public/screenshots/apply-patch-panel.png and b/docs/public/screenshots/apply-patch-panel.png differ diff --git a/docs/public/screenshots/carried-work-notice.png b/docs/public/screenshots/carried-work-notice.png index 2ffe76d1..dd8ca3a1 100644 Binary files a/docs/public/screenshots/carried-work-notice.png and b/docs/public/screenshots/carried-work-notice.png differ diff --git a/docs/public/screenshots/create-site-modal.png b/docs/public/screenshots/create-site-modal.png index 13dc8fa3..e7d8ccda 100644 Binary files a/docs/public/screenshots/create-site-modal.png and b/docs/public/screenshots/create-site-modal.png differ diff --git a/docs/public/screenshots/debug-log.png b/docs/public/screenshots/debug-log.png index e54590e9..590dd114 100644 Binary files a/docs/public/screenshots/debug-log.png and b/docs/public/screenshots/debug-log.png differ diff --git a/docs/public/screenshots/dev-server-running.png b/docs/public/screenshots/dev-server-running.png index 69022f8b..e0c70cb9 100644 Binary files a/docs/public/screenshots/dev-server-running.png and b/docs/public/screenshots/dev-server-running.png differ diff --git a/docs/public/screenshots/github-sign-in.png b/docs/public/screenshots/github-sign-in.png index 32daa028..4057a0b5 100644 Binary files a/docs/public/screenshots/github-sign-in.png and b/docs/public/screenshots/github-sign-in.png differ diff --git a/docs/public/screenshots/gutenberg-pull-request-panel.png b/docs/public/screenshots/gutenberg-pull-request-panel.png index dbdee01f..90b2186a 100644 Binary files a/docs/public/screenshots/gutenberg-pull-request-panel.png and b/docs/public/screenshots/gutenberg-pull-request-panel.png differ diff --git a/docs/public/screenshots/gutenberg-site-view.png b/docs/public/screenshots/gutenberg-site-view.png index 6bc46b60..df306676 100644 Binary files a/docs/public/screenshots/gutenberg-site-view.png and b/docs/public/screenshots/gutenberg-site-view.png differ diff --git a/docs/public/screenshots/linked-pull-requests.png b/docs/public/screenshots/linked-pull-requests.png index 8c555912..6d857a69 100644 Binary files a/docs/public/screenshots/linked-pull-requests.png and b/docs/public/screenshots/linked-pull-requests.png differ diff --git a/docs/public/screenshots/mail-panel.png b/docs/public/screenshots/mail-panel.png index ab752298..698322c4 100644 Binary files a/docs/public/screenshots/mail-panel.png and b/docs/public/screenshots/mail-panel.png differ diff --git a/docs/public/screenshots/settings-dialog.png b/docs/public/screenshots/settings-dialog.png new file mode 100644 index 00000000..ef88a0d3 Binary files /dev/null and b/docs/public/screenshots/settings-dialog.png differ diff --git a/docs/public/screenshots/site-menu.png b/docs/public/screenshots/site-menu.png index a5bfded7..3c1f61d1 100644 Binary files a/docs/public/screenshots/site-menu.png and b/docs/public/screenshots/site-menu.png differ diff --git a/docs/public/screenshots/site-view.png b/docs/public/screenshots/site-view.png index 15861685..1261e301 100644 Binary files a/docs/public/screenshots/site-view.png and b/docs/public/screenshots/site-view.png differ diff --git a/docs/public/screenshots/site-with-tickets.png b/docs/public/screenshots/site-with-tickets.png index ed0c8f75..e19217aa 100644 Binary files a/docs/public/screenshots/site-with-tickets.png and b/docs/public/screenshots/site-with-tickets.png differ diff --git a/docs/public/screenshots/stale-site-notice.png b/docs/public/screenshots/stale-site-notice.png index 4378063f..0ba8f810 100644 Binary files a/docs/public/screenshots/stale-site-notice.png and b/docs/public/screenshots/stale-site-notice.png differ diff --git a/docs/public/screenshots/submit-changes-diff.png b/docs/public/screenshots/submit-changes-diff.png index e16ba474..bd431be9 100644 Binary files a/docs/public/screenshots/submit-changes-diff.png and b/docs/public/screenshots/submit-changes-diff.png differ diff --git a/docs/public/screenshots/submit-destinations.png b/docs/public/screenshots/submit-destinations.png index f9628be6..1648a34d 100644 Binary files a/docs/public/screenshots/submit-destinations.png and b/docs/public/screenshots/submit-destinations.png differ diff --git a/docs/public/screenshots/terminal.png b/docs/public/screenshots/terminal.png index d3eadb6c..f7da494c 100644 Binary files a/docs/public/screenshots/terminal.png and b/docs/public/screenshots/terminal.png differ diff --git a/docs/public/screenshots/trac-ticket-panel.png b/docs/public/screenshots/trac-ticket-panel.png index e8ab0ae1..cb39cbe9 100644 Binary files a/docs/public/screenshots/trac-ticket-panel.png and b/docs/public/screenshots/trac-ticket-panel.png differ diff --git a/docs/public/screenshots/trunk-update-progress.png b/docs/public/screenshots/trunk-update-progress.png index 32dd24da..57b0dd80 100644 Binary files a/docs/public/screenshots/trunk-update-progress.png and b/docs/public/screenshots/trunk-update-progress.png differ diff --git a/docs/public/screenshots/update-incomplete.png b/docs/public/screenshots/update-incomplete.png index 9af8673e..94836966 100644 Binary files a/docs/public/screenshots/update-incomplete.png and b/docs/public/screenshots/update-incomplete.png differ diff --git a/docs/public/screenshots/xdebug-setup-menu.png b/docs/public/screenshots/xdebug-setup-menu.png new file mode 100644 index 00000000..581ae718 Binary files /dev/null and b/docs/public/screenshots/xdebug-setup-menu.png differ diff --git a/scripts/screenshots/fixtures.cjs b/scripts/screenshots/fixtures.cjs index 73920ddc..2d0e6962 100644 --- a/scripts/screenshots/fixtures.cjs +++ b/scripts/screenshots/fixtures.cjs @@ -221,6 +221,15 @@ async function standInForTheOutside(app) { return { ok: true, url: serverUrl }; }); replace('url:open', () => true); + // The editors found on the machine are the same two in every picture, + // whatever is installed where the shots are taken. + replace('editor:list', () => ({ + detected: [ + { id: 'vscode', name: 'Visual Studio Code', path: '/Applications/Visual Studio Code.app' }, + { id: 'phpstorm', name: 'PhpStorm', path: '/Applications/PhpStorm.app' } + ], + names: { vscode: 'Visual Studio Code', cursor: 'Cursor', phpstorm: 'PhpStorm', sublime: 'Sublime Text', zed: 'Zed' } + })); }, [LINKED_TICKET, LINKED_PULL_REQUESTS, TICKET_FROM_TRAC, SMTP_PORT, SERVER_URL, TICKET_PATCH]); } @@ -445,4 +454,4 @@ function cleanFixtureSites() { removeRepo(FIXTURE_ROOT); } -module.exports = { standInForTheOutside, buildFixture, cleanFixtureSites, FIXTURE_ROOT, TICKET_FROM_TRAC, LINKED_PULL_REQUESTS, LINKED_TICKET, OTHER_TICKET, SUMMARY_FILE, SUMMARY_FIXED, FIXED_LINE, SUMMARY_TEST_FILE, SUMMARY_TEST }; +module.exports = { standInForTheOutside, buildFixture, cleanFixtureSites, FIXTURE_ROOT, TICKET_FROM_TRAC, LINKED_PULL_REQUESTS, LINKED_TICKET, OTHER_TICKET, SUMMARY_FILE, SUMMARY_FIXED, FIXED_LINE, SUMMARY_TEST_FILE, SUMMARY_TEST, SERVER_URL, SMTP_PORT }; diff --git a/scripts/screenshots/shots.cjs b/scripts/screenshots/shots.cjs index c1041277..1fc5b4ab 100644 --- a/scripts/screenshots/shots.cjs +++ b/scripts/screenshots/shots.cjs @@ -50,7 +50,7 @@ const path = require('path'); const ui = require('../../tests/e2e/helpers/ui.cjs'); const { FIXTURE_ROOT, TICKET_FROM_TRAC, LINKED_PULL_REQUESTS, LINKED_TICKET, OTHER_TICKET, - SUMMARY_FILE, SUMMARY_FIXED, FIXED_LINE, SUMMARY_TEST_FILE, SUMMARY_TEST + SUMMARY_FILE, SUMMARY_FIXED, FIXED_LINE, SUMMARY_TEST_FILE, SUMMARY_TEST, SERVER_URL, SMTP_PORT } = require('./fixtures.cjs'); // The fixture's site that is a real checkout (the `repo:` variants). @@ -600,6 +600,63 @@ const shots = [ } }, + { + slug: 'settings-dialog', + tier: 'fixture', + variant: 'seeded', + // The General tab is taller than the window the harness opens, and + // the dialog would scroll to reach its foot: a taller window, so the + // picture has every setting on the tab. + viewport: { width: 1200, height: 1300 }, + target: (page) => ui.settingsDialog(page), + prepare: async (page) => { + await selectSite(page, 'my-first-patch'); + await ui.settingsButton(page).click(); + // The editors are the fixture's (see standInForTheOutside). The + // control is disabled until they are found, and a trial click + // waits for it to be enabled. + await ui.settingsDialog(page).getByLabel('Code editor', { exact: true }).click({ trial: true }); + await page.mouse.move(0, 0); + } + }, + { + slug: 'xdebug-setup-menu', + tier: 'fixture', + variant: 'seeded', + // The site's details from their heading to the foot of the menu of + // editors, open under the Debugging row. + clip: async (page) => { + const details = await page.getByRole('complementary', { name: 'Details of my-first-patch', exact: true }).boundingBox(); + const menu = await page.getByRole('menu').filter({ visible: true }).boundingBox(); + return insideThePage(page, { x: details.x - 8, y: details.y, width: details.width + 16, height: menu.y + menu.height + 16 - details.y }); + }, + prepare: async (page, app) => { + await selectSite(page, 'my-first-patch'); + await page.getByText(LINKED_PULL_REQUESTS[0].title).waitFor(); + // Turned on as a contributor does, in the settings. + await ui.settingsButton(page).click(); + const dialog = ui.settingsDialog(page); + await ui.settingsTab(page, 'Sites').click(); + await dialog.getByRole('switch', { name: 'Step debugging (Xdebug)', exact: true }).click(); + await ui.closeDialogButton(dialog).click(); + await dialog.waitFor({ state: 'detached' }); + // The server's start is the fixture's, and says the server has + // Xdebug, as main says it of one started with the setting on. + await app.evaluate(({ ipcMain }, [serverUrl, smtpPort]) => { + ipcMain.removeHandler('playground:start'); + ipcMain.handle('playground:start', async (event, sitePath) => { + event.sender.send('smtp:started', { sitePath, port: smtpPort }); + event.sender.send('playground:url', { sitePath, url: serverUrl, xdebug: true }); + return { ok: true, url: serverUrl, xdebug: true }; + }); + }, [SERVER_URL, SMTP_PORT]); + await ui.startDevServerButton(page).click(); + const setup = page.getByRole('button', { name: 'Set up Xdebug for your editor', exact: true }); + await setup.click(); + await page.getByRole('menuitem', { name: 'VS Code', exact: true }).waitFor(); + } + }, + // ---- Live tier: real site, maintainer present. `instructions` is what the // harness prints before pausing. //