유대선
프로젝트로
·기술 회고·2

Admin UI for log-entry companions

Browser-based editor for <slug>.human.mdx companion files so they no longer have to be edited by hand on disk.

What was done

Added a browser path for editing log-entry companion files. Before this commit, the companion feature was file-based only: the author had to open content/logs/<project>/<slug>.human.mdx in an editor and commit by hand. After this commit there is a list view per project, a per-entry editor, and an API route that writes the file through storage.commitFile and revalidates the affected public paths.

Why it was needed

Stated in the commit message: companions had shipped as a file-only feature in 7f46862, so adding one required a local checkout + manual commit. The point of the admin section is that the owner actually uses it; an authoring step that requires git add defeats that. Companions also live in the blog repo (not the satellite, per 7f46862), so the PAT and storage.commitFile plumbing already existed — this commit was purely the UI on top.

Files / functions changed (real paths)

Total: 367 insertions across 7 files.

Result / verification

The commit message describes the wiring but does not record a verification step. The route shape is internally consistent (list → detail → API → revalidate), and storage.commitFile was already in production use for other admin writes by this point, so the write path was not new code.

Open / what didn't get done

The new routes are [slug]/logs/[entry] under app/(admin)/admin/projects/. The next day this collided with the [locale]/[slug] segment pattern elsewhere in the project tree and caused a production hang on 2026-05-31 — see that day's troubleshoot entry. Nothing in this commit guards against the collision; the issue was not visible until the build/route resolver ran in production.

Commit — 3c8c80f