You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Step 3: verify with unit tests + build only, never Playwright
The build prompt told the agent to 'run the app and confirm' UI behaviors
(a row renders, survives reload), which the Copilot App satisfied by
launching the Playwright MCP server and popping a browser — even though
Step 3 is meant to be a headless build/test step and Playwright is
introduced in Step 4.
Rewrite the prompt's verification to explicitly use headless unit tests
(URL normalisation, corrupted-storage recovery, exact ' :: ' formatting)
plus 'npm run build', and add an explicit instruction not to open a
browser or start the Playwright MCP server in this step. Align the
'watch the agent test' narration to match. Playwright now runs only in
Step 4.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: a9ddd07b-77bf-43e0-a5d9-c6426a067e0e
Copy file name to clipboardExpand all lines: .github/steps/3-step.md
+15-12Lines changed: 15 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,18 +71,21 @@ A few things to know about the build:
71
71
> - Make sure a JavaScript error can never let the form fall back
72
72
> to a native submit that reloads the page and loses the URL —
73
73
> keep event.preventDefault() as the first thing on submit.
74
-
> - Add a small unit test around the load/normalise helper so the
75
-
> non-array case is covered.
74
+
> - Add unit tests (no browser) around the pure helpers that cover:
75
+
> - a URL with and without "https://" normalises to the same
76
+
> saved value;
77
+
> - loading an empty, corrupted, legacy, or non-array
78
+
> "mona-bookmarks" value recovers instead of throwing;
79
+
> - a saved bookmark formats as "<url> :: <slug>" with the exact
80
+
> " :: " separator.
76
81
>
77
-
> Then run the app and confirm:
78
-
> - Adding a URL with and without "https://" renders a bookmark
79
-
> and it survives a reload.
80
-
> - A pre-seeded, corrupted "mona-bookmarks" value doesn't break
81
-
> Add — the app recovers instead of throwing.
82
-
> - Adding a bookmark renders a new row immediately, without a
83
-
> full page reload.
84
-
> - The rendered row includes the exact " :: " separator between
85
-
> the URL text and the slug.
82
+
> Verify your work without launching a browser:
83
+
> - Run the unit tests and make sure they pass.
84
+
> - Run the production build (npm run build) and make sure it
85
+
> succeeds — this proves localStorage stays behind the
86
+
> client:load boundary.
87
+
> Do not open a browser or start the Playwright MCP server in this
88
+
> step; previewing and driving the running app comes in Step 4.
86
89
>
87
90
> Then open a pull request — but don't merge it:
88
91
> - Include "Closes https://github.com/{{full_repo_name}}/issues/2"
@@ -93,7 +96,7 @@ A few things to know about the build:
93
96
> ```
94
97
95
98
<img width="360" alt="The build prompt in the session with the Build the bookmarks app issue #2 referenced as a chip" src="../images/step3-issue-prompt.png" />
96
-
1. **Watch the agent test the implementation.** Building the feature includes verifying it — Copilot runs the **unit tests** you asked for and builds the app, confirming a URL with and without `https://` is stored, that bookmarks survive a reload, and that a corrupted `mona-bookmarks` value doesn't break **Add**. You'll preview the app live and drive it with Playwright in **Step 4** — here the tests and build are enough to trust the diff before you merge.
99
+
1. **Watch the agent test the implementation.** Building the feature includes verifying it — Copilot runs the **unit tests** you asked for and the **production build**, all headless: no browser opens and the Playwright MCP server stays idle. The tests cover URL normalisation, corrupted-storage recovery, and the exact `" :: "` formatting, while the build proves `localStorage` stays behind the `client:load` boundary. You'll preview the app live and drive it with Playwright in **Step 4** — here the tests and build are enough to trust the diff before you merge.
97
100
1. **Review the diff before you merge.** Agent merge opens the pull request that links issue **#2** for you — review the changes in the session's **Changes** tab (or a browser canvas on the PR). You'll merge it in **Activity 2** once you're satisfied.
98
101
99
102
<img width="440" alt="Session review of the base62 nextSlug helper (mona- prefixed slugs), persistence and event-wiring notes, with Changes +107 -21 and PR #4 buttons at the bottom" src="../images/ghcp-app-step3.png" />
0 commit comments