Skip to content

DEV: Add a development server task and richer sample data - #271

Draft
davidtaylorhq wants to merge 2 commits into
mainfrom
dev-server
Draft

davidtaylorhq wants to merge 2 commits into
mainfrom
dev-server

Conversation

@davidtaylorhq

@davidtaylorhq davidtaylorhq commented Aug 25, 2026 •

Copy link
Copy Markdown
Member

Adds bundle exec rake dev to start the backend and frontend together. The task checks Redis and pnpm, checks the ports, installs missing dependencies, starts Puma and Vite, waits for HTTP readiness, and opens the viewer. rake client_dev remains an alias. It reports unexpected server exits and stops both process groups on shutdown.

Vite binds explicitly to 127.0.0.1, matching the port check, readiness URL, and browser URL. This avoids a startup timeout on systems where localhost resolves to IPv6 while the task checks IPv4. BACKEND_PORT, FRONTEND_PORT, and NO_OPEN=1 customize the local workflow.

The sample website gains a reusable loader and a test-data generator. Existing file-backed samples remain available; the new scenarios synthesize exception backtraces, HTTP request context, database errors, background-job failures, duplicates, severity coverage, and Unicode/multiline payloads. Seeds make the generated random choices reproducible; timestamps still reflect generation time.

GET /report_error displays the generator without creating reports. POST /report_error generates batches of up to 100 reports, with the browser coordinating larger runs and displaying progress. The development task enables custom patterns in the viewer.

Adds website tests and a CI job, and makes publishing depend on that job. Validation includes the Ruby and website suites plus real startup, browser interaction, and shutdown checks.

Extracted from #264

Co-authored-by: Sam Saffron sam.saffron@gmail.com


Stack created with GitHub Stacks CLI • Give Feedback 💬

@davidtaylorhq
davidtaylorhq force-pushed the dev-server branch 2 times, most recently from bb591b1 to 96cfc00 Compare August 25, 2026 17:55
Base automatically changed from frontend-fixes to main September 24, 2026 16:36
davidtaylorhq and others added 2 commits September 24, 2026 17:36
`rake client_dev` spawned two shells and waited on them. If either failed you got no explanation, and you had to remember to install the frontend and website dependencies yourself first.

`rake dev` replaces it. It checks that Redis and npm are available, refuses to start if either port is already taken, installs whatever dependencies are missing, starts both servers, waits until each one answers a request, and opens the app. If a server dies on the way up it says which one. Ctrl-C stops both, and anything still running after five seconds is killed. `rake client_dev` remains as an alias.

The website's sample data was a single hardcoded block. It is now a `SampleLoader` reading scenarios from a data file, covering exceptions with real backtraces, HTTP failures with request context, SQL errors, background job retries, repeated events that exercise grouping, every severity, and unicode and multiline messages. That makes the log viewer worth looking at while developing it, rather than a wall of identical rows.

The website gets its own test suite and a CI job, so the demo application is no longer the one part of the repository nothing checks.

Extracted from #264

Co-authored-by: Sam Saffron <sam.saffron@gmail.com>
Vite defaults to localhost, which can resolve to ::1 while the development task checks and opens 127.0.0.1. Explicitly bind Vite to IPv4 so a healthy frontend does not time out during startup.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant