Skip to content

Precens 9.1 - #43

Draft
pixelcmtd wants to merge 8 commits into
daddyfrom
precens-91
Draft

Precens 9.1#43
pixelcmtd wants to merge 8 commits into
daddyfrom
precens-91

Conversation

@pixelcmtd

Copy link
Copy Markdown
Member

No description provided.

item 4 of #39: formats check.created_at in the check page header via
Intl.DateTimeFormat (en-CA, UTC, comma stripped) — e.g. 'kcc v0.8 check
test · 2026-08-03 12:34:05 UTC'.
CI ran `astro sync` (build mode) in a separate step, writing the content
store to node_modules/.astro, while vitest (dev mode) reads root/.astro
— so the template tests were validating against an empty store.

Pin `cacheDir` to `.astro` and fold `astro sync` into the test script so
both read the same store, then assert the collection actually loads
every template in tMeta.
@pixelcmtd pixelcmtd added this to the Precens 9.1 milestone Sep 8, 2026
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.

`getTemplateVersion` now treats omitted, null, and empty revisions as
latest, replacing `getCurrentTemplate`. `check.save` rejects 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.
Replaces the raw console.log calls in src/middleware.ts with Astro
context.logger (AstroRuntimeLogger, on the middleware context since
Astro 7), so these lines go through Astro logging instead of the raw
console.

logFirstBlock now takes the logger as a parameter; the call site passes
context.logger.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants