Commit da78dff
authored
Make spec-detected auth methods immutable in the add flow (#1188)
* e2e: browse/promote authoring loop and cross-OS packaged-desktop targets
Two additions to the e2e setup sharing one idea: the interfaces you develop
the product with are the same ones the generated tests drive, and every run is
watchable.
Authoring loop (src/journey/, scripts/cli.ts):
- `bun run cli browse <target> <step>` drives the live web UI one step at a
time (real logged-in Chromium), each step replaying the whole flow and
printing the page's controls plus a screenshot. Steps span the browser, a
terminal (`run`), and HTTP (`request`), interleaved in one session.
- `bun run cli promote <target> "<name>"` turns the recorded journey into a
committed scenario() and runs it. One Step DSL is the source of truth for
both live execution and codegen, so the generated test drives the same
surfaces the exploration drove and cannot quietly diverge.
Cross-OS packaged desktop (setup/desktop-*, desktop-vm/, src/vm/desktop.ts):
- desktop-macos / desktop-linux / desktop-windows run the real electron-builder
bundle inside a guest, drive it over a CDP tunnel, and film the console into
runs/<target>/ alongside test.ts and step screenshots. One shared scenario and
driver; only launch and capture differ per OS:
macOS: autologin Aqua session, launchctl asuser, screencapture
linux: Xvfb + openbox, xdotool window resize, ffmpeg x11grab
windows: dockur (QEMU) interactive session, QEMU screendump
- macOS and Linux auto-provision a tart guest and build the bundle locally (the
executor binary cross-compiles via BUN_TARGET); Windows attaches to a dockur
host configured through E2E_DESKTOP_WIN_* env. The desktop targets are not in
the default test chain and skip honestly without a guest.
Also:
- Force tart SSH to password-only (PubkeyAuthentication=no, IdentitiesOnly=yes)
so a loaded SSH agent does not exhaust the guest's MaxAuthTries, an
intermittent failure the existing cli-{os} lanes also hit.
- build-sidecar keys the executable-bit chmod on the build target, not the
host, so a windows-target cross-build no longer fails looking for a unix
executor binary.
* Make spec-detected auth methods immutable in the add flow
A method seeded from spec/probe detection rendered the full None/API key/
OAuth selector and editable fields, so a user could silently switch a
detected method (e.g. a Bearer-token API) to OAuth with empty endpoints and
end up with a broken integration.
Detected methods now render read-only in a disabled state: a lock icon, the
auth kind named explicitly (OAuth / API key / No auth, since MCP seeds a
detected method as just "Detected"), the declared config shown read-only,
and "Pulled from spec. Remove to override." The only action is to remove the
row and add a custom one; hand-added methods stay fully editable. This lives
in the shared AuthMethodListEditor, so the OpenAPI and MCP add flows both get
it. Detection is keyed off an explicit row flag rather than the seed slug,
since MCP seeds a detected method without one.
Also fix PlacementLine: its inline-flex container trimmed the whitespace at
child edges, dropping the space after "Authorization:" and the trailing space
in a "Bearer " prefix and rendering "Authorization:Bearer••••••". Render it
as plain inline with preserved whitespace.1 parent 8109db1 commit da78dff
19 files changed
Lines changed: 2021 additions & 35 deletions
File tree
- apps/desktop/scripts
- e2e
- desktop-vm
- scripts
- selfhost
- setup
- src
- journey
- vm
- targets
- packages/react/src
- components
- lib
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
49 | 53 | | |
50 | 54 | | |
51 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
130 | 130 | | |
131 | 131 | | |
132 | 132 | | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
133 | 207 | | |
134 | 208 | | |
135 | 209 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
0 commit comments