DEV: Add a development server task and richer sample data - #271
Draft
davidtaylorhq wants to merge 2 commits into
Draft
davidtaylorhq wants to merge 2 commits into
davidtaylorhq wants to merge 2 commits into
Conversation
davidtaylorhq
force-pushed
the
dev-server
branch
2 times, most recently
from
August 25, 2026 17:55
bb591b1 to
96cfc00
Compare
davidtaylorhq
force-pushed
the
dev-server
branch
from
August 25, 2026 18:23
96cfc00 to
c1512c2
Compare
davidtaylorhq
force-pushed
the
dev-server
branch
from
September 24, 2026 11:59
c1512c2 to
cf7297c
Compare
davidtaylorhq
force-pushed
the
dev-server
branch
from
September 24, 2026 14:52
735251c to
77dc87c
Compare
`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.
davidtaylorhq
force-pushed
the
dev-server
branch
from
September 24, 2026 16:36
77dc87c to
eafc8c0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
bundle exec rake devto 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_devremains 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 wherelocalhostresolves to IPv6 while the task checks IPv4.BACKEND_PORT,FRONTEND_PORT, andNO_OPEN=1customize 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_errordisplays the generator without creating reports.POST /report_errorgenerates 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 💬