Repository navigation
Share routes, show both frontiers, explain each step, harden the API - #37
Merged
Merged
Conversation
Sharing: /?from=&to= opens or runs a route and carries per-route Open
Graph tags; /api/og.png draws the route with Pillow and the bundled
JetBrains Mono. Found routes are kept 30 days under route:{start}:{end}.
Search input: title suggestions (/api/suggest, resolved redirects,
disambiguation flagged), example routes and "Surprise me".
Visible algorithm: progress carries per-side counts and the pages each
frontier read last; the wait scene draws both sides growing toward each
other. Results name the meeting page and per-side totals.
Link context: /api/context quotes the sentence in each article that links
to the next step, parsed from wikitext (app/wikitext.py).
Robustness: progress streams over SSE (/tasks/stream/<id>) with polling
as the fallback, so Gunicorn runs gthread workers. Per-IP rate limits in
Redis, ProxyFix for the real client IP, hub link lists cached a week.
Deploy: the Dockerfile copies entrypoint.sh once (executable in git) and
pins uv; railway.toml no longer repeats the start command.
Quality: CI (format, lint, types, script syntax, tests at 95% coverage,
Docker build), pre-commit hooks, README architecture and measured
benchmark. Also an adaptive SVG favicon, touch icons, manifest, a real
404 page, root robots.txt/favicon.ico (previously redirected to /), and
nosniff/referrer headers.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What this adds
Shareable routes
/?from=Banana&to=Shah%20Rukh%20Khanopens that route, or runs the search if it isn't saved. The address bar updates once a route is found, and there's a Copy link button (the system share sheet on touch devices)./api/og.pngis drawn with Pillow in the OG image's style, and the page carries per-route Open Graph and Twitter tags. Found routes are kept for 30 days (route:{start}:{end}).Easier searching
/api/suggest): an ARIA combobox with redirects resolved and disambiguation pages flagged before they fail.Visible algorithm
Article context on each step
/api/contextquotes the sentence in each article that links to the next step, with its section, parsed from wikitext (app/wikitext.py). A link found only in an infobox or a navigation box is labelled as such instead.Performance and robustness
/tasks/stream/<id>), falling back to polling. Gunicorn now runsgthreadworkers for this.429andRetry-Afterbeyond that.ProxyFixmakesremote_addrthe real client behind Railway's proxy.Deploy cleanup
entrypoint.shonce (it's now executable in git), runs it asCMD, and pins uv to 0.10.11.railway.tomlno longer repeats the start command.Quality and polish
uv.lock.favicon.ico, touch and manifest icons, and a real 404 page./robots.txtand/favicon.icoare now served at the root; before this they redirected to/, so crawlers never saw robots.txt.nosniffandReferrer-Policyheaders.Testing
fakeredisand only Wikipedia is stubbed. New tests cover the wikitext parser, suggestions, link context, hub TTLs, the SSE stream, rate limits, the share image and tags (including escaping and proxy scheme), frontier invariants, and root files.gthreadGunicorn stack, I ran a live search through the event stream; suggestions, article context, the share image and tags, and the 429 all behaved as expected.Not yet checked
./dev.share unaffected.🤖 Generated with Claude Code