mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 19:17:10 +00:00
replay ui fix (#56)
* refactor: rename inspect to replay across the codebase Renames inspect-ui/ to replay-ui/, internal/inspect/ to internal/replay/, the CLI subcommand from `sanderling inspect` to `sanderling replay`, and updates all references in docs, Makefile, README, and Go comments. * feat(replay-ui): show spec filename with full path on hover RunList and RunDetail now render the basename of spec_path (e.g. login.spec.ts) with the full path available as a title tooltip.
This commit is contained in:
71 files changed
+104
-92
No files matched your search
@@ -18,7 +18,7 @@ flowchart TB
|
||||
DC["Device / Emulator"]
|
||||
CH["Chrome (CDP)"]
|
||||
RD[("runs/")]
|
||||
IN["sanderling inspect\nHTTP + SSE"]
|
||||
IN["sanderling replay\nHTTP + SSE"]
|
||||
UI["Web UI (React)"]
|
||||
|
||||
D -->|gRPC| SC
|
||||
@@ -45,9 +45,9 @@ flowchart TB
|
||||
|
||||
On native, the transport split exists because only real UI events need to cross process and OS-API boundaries. Introspection is cheap, frequent, and lives on a fast local socket directly to the app. On web, CDP handles both.
|
||||
|
||||
## Inspect UI
|
||||
## Replay UI
|
||||
|
||||
`sanderling inspect` is a separate mode of the same Go binary. It serves an embedded React bundle and reads `runs/` from disk, streaming file-watcher events over SSE so the UI updates as new steps land. It has no connection to any driver; it only consumes the trace artifacts.
|
||||
`sanderling replay` is a separate mode of the same Go binary. It serves an embedded React bundle and reads `runs/` from disk, streaming file-watcher events over SSE so the UI updates as new steps land. It has no connection to any driver; it only consumes the trace artifacts.
|
||||
|
||||
## Per-step cycle
|
||||
|
||||
|
||||
@@ -10,9 +10,9 @@ Architectural and organizational decisions worth recording. Each entry states th
|
||||
|
||||
## Directory and Package Organization
|
||||
|
||||
### `web/` renamed to `inspect-ui/`
|
||||
### `web/` renamed to `replay-ui/`
|
||||
|
||||
The directory containing the React/TypeScript frontend is `inspect-ui/`, not `web/`. The name `web/` was ambiguous (the project also has a web/Chrome driver target). `inspect-ui/` makes the purpose explicit: this is the UI for the `sanderling inspect` command.
|
||||
The directory containing the React/TypeScript frontend is `replay-ui/`, not `web/`. The name `web/` was ambiguous (the project also has a web/Chrome driver target). `replay-ui/` makes the purpose explicit: this is the UI for the `sanderling replay` command.
|
||||
|
||||
### Keep `internal/`
|
||||
|
||||
@@ -22,9 +22,9 @@ Go's `internal/` directory restriction prevents any code outside this module fro
|
||||
|
||||
The `driver.go` file defines the `DeviceDriver` interface. Concrete implementations live in subdirectories: `sidecar/` (gRPC to the native sidecar), `chrome/` (CDP), `mock/` (tests). This pattern keeps the runner and verifier decoupled from any specific platform.
|
||||
|
||||
### `internal/verifier/marshal.go` moves to `internal/inspect/`
|
||||
### `internal/verifier/marshal.go` moves to `internal/replay/`
|
||||
|
||||
`marshal.go` serializes LTL formulas to JSON for the inspect UI. That is an inspect concern, not a verifier concern. Verifier should not know inspect exists.
|
||||
`marshal.go` serializes LTL formulas to JSON for the replay UI. That is a replay concern, not a verifier concern. Verifier should not know replay exists.
|
||||
|
||||
### `internal/verifier/bindings.go` splits into `types.go` + `bindings.go`
|
||||
|
||||
@@ -44,7 +44,7 @@ Android device enumeration, AVD selection, and emulator boot logic moves to `int
|
||||
|
||||
Driver setup, agent connection, verifier init, trace setup, and runner orchestration extract to `internal/testrun/`. `cmd/sanderling/` wires CLI flags to `testrun` calls and nothing more.
|
||||
|
||||
### `internal/inspect/runs.go` splits into multiple files
|
||||
### `internal/replay/runs.go` splits into multiple files
|
||||
|
||||
429 LOC with mixed concerns (cache, file I/O, JSON decoding, summary types) splits into at least `runs_cache.go` and `runs_decode.go` within the same package.
|
||||
|
||||
|
||||
Reference in new issue
Block a user