| Age | Commit message (Collapse) | Author |
|
Discussions are served from GitHub's older server-rendered HTML, with no
embeddedData JSON to read, so the scraper walks the DOM the way the pull
request and wiki code does. A discussion's timeline opens with its own
post and continues with its comments, each carrying its replies nested
inside it, which is where the recursion in _discussionComment.eta comes
from. Categories, upvotes, and the answer a Q&A discussion is marked with
all come along.
Only what GitHub renders up front is shown: neither the next page of
discussions nor the replies it hides behind a "Show N previous replies"
button are fetched, so a comment says how many replies it is missing.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
|
|
layout.eta was two things at once: the HTML shell every page needs and
the repository chrome around it. owner.eta, being the one page that is
not about a repository, could use neither and carried its own copy of
the shell, which had drifted -- its footer named no build commit and
did not link to the original page on GitHub.
The shell moves to views/layouts/base.eta, taking its title and any
deferred scripts as layout data, and the chrome to views/layouts/repo.eta,
a layout over it that adds the clone commands, nav, search box, and the
"/" shortcut that focuses it. Repository pages point at repo.eta and
render as before; owner.eta uses base.eta directly and so gains the
footer it was missing.
Templates now live in more than one directory, so scripts/build.ts walks
views/ recursively and keys each template by its path underneath it.
Names crossing a directory are written from the views root
("/layouts/base.eta"), the one form both Eta's filesystem resolver and
the precompiled resolver in worker.ts agree on; siblings stay relative.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ba5p88cWtCq42vf3uweweL
|
|
|
|
Nothing in a commits payload says whether the path it lists is a file or
a directory: currentBlobPath, despite the name, is only the path filter,
and is set for a directory just the same. GitHub's own UI cannot tell
either, and points its browse button at /blob/<oid>/<path> so that the
redirect resolves a file to its blob. We do the same, and the blob route
already turns that redirect into one of our own tree URLs.
Breadcrumbs now stay in the view they were clicked from, so walking up
from a history lands in the history of each parent directory rather than
in its listing. The last crumb remains the page you are already on.
A path with no commits now says so rather than rendering an empty page.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01R7pRKdmTvNDgT4ZXrwkbH8
|
|
Wikis are one of the last parts of GitHub still served as plain Rails
HTML, with no embedded JSON to read, so this scrapes the markup: a page
and any older revision of it, the _Sidebar and _Footer a wiki can
define, and the page index. Every page is already in the sidebar of
every page, since the "Show N more pages" button only unhides the rest,
so linking the whole wiki costs no second request.
Routes mirror GitHub's and resolve in its order, so an underscore name
reserved for its own actions (_pages, _history, _new, _edit) can never
be mistaken for a page; the ones we don't serve fall through to the
usual redirect. A slug reaches us decoded and has to be encoded again
rather than interpolated the way a ref is, or a page named C# would
truncate at the fragment.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013rQG1io1i4GJQW5RFcXNGd
|
|
Workers can't shell out at request time, so the commit has to be baked
in before wrangler bundles the sources. compile-views.ts grows a second
job and becomes scripts/build.ts: alongside the precompiled views it
writes src/commit.generated.ts with `git describe --tags --always
--dirty`, which yields a bare short hash until the repo is tagged and
marks builds made from an unclean working copy.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
The Node server entry, esbuild bundle, and Makefile rsync/systemd deploy
are gone; wrangler dev and wrangler deploy are the only paths now, so the
dev:cf/deploy:cf scripts take over the plain dev/deploy names. @hono/
node-server and esbuild drop out with src/index.ts, and the README's
systemd socket and nginx snippets go with them.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
|
Split routes into a shared createApp() (src/app.ts) used by both the
Node entry (src/index.ts) and a new Workers entry (src/worker.ts).
Workers disallow runtime code generation, so scripts/compile-views.ts
precompiles the Eta templates into src/views.generated.ts and rendering
switches from renderAsync to the sync render. Static files move to
public/static so Workers Static Assets can serve them; the Node build
and serveStatic root are updated to match.
Deploy with pnpm run deploy:cf, local dev with pnpm run dev:cf.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
|
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
|
|
|
|