Add versioned template routes and revision selector - #42
Merged
Conversation
CMJanina
force-pushed
the
t3code/review-versioned-template-route
branch
from
September 8, 2026 16:53
c970b59 to
8910a22
Compare
🔄 Force-push range-diff
Show range-diff-: ------- > 1: 5787112 show created_at on check pages (#40)
-: ------- > 2: b6d1e86 rewind: make card values directly editable, remove settings inputs
-: ------- > 3: 80c2781 rewind: collapse component into a pure astro page
-: ------- > 4: 7500bd1 rewind: factor shared text-align, drop redundant width on flex items
-: ------- > 5: fa338fb rewind: add hint that values are click-to-edit
-: ------- > 6: e554f7d Test template collection integrity (#41)
1: c970b59 ! 7: 8910a22 Add versioned template routes and revision selector
@@ test/templates.test.ts: import { getCollection } from "astro:content";
import { readdir } from "node:fs/promises";
test("every template directory has tMeta metadata and vice versa", async () => {
-@@ test/templates.test.ts: test("every template directory has tMeta metadata and vice versa", async () => {
- });
-
- const templates: template[] = await getCollection("templates").then(x => x.map(t => t.data));
-+assert(templates.length > 0, "templates must be loaded");
-
- for (const t of templates) {
- test(`${t.id} revisions are unique`, () => {
@@ test/templates.test.ts: test("kink ids are unique", () => {
}
} |
5 tasks
pixelcmtd
approved these changes
Sep 8, 2026
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.
Add the versioned template route and dropdown from the first item in #39.
/internal/templates/[id]/shows the latest revision, while/internal/templates/[id]/[rev]/selects a specific revision. The dropdown follows procens with a latest option and a Versions group.getTemplateVersionnow treats omitted, null, and empty revisions as latest, replacinggetCurrentTemplate.check.saverejects empty revisions so saved Checks remain pinned to a revision.Validation: all 22 tests and the build pass. Checked latest and explicit revision routes, dropdown selection, unknown-revision 404, and empty-revision save rejection.