Skip to content

Adds admin pages for notes and API tokens#28

Merged
AdaInTheLab merged 1 commit intomasterfrom
ledger-admin-tokens-and-notes-hardening
Jan 7, 2026
Merged

Adds admin pages for notes and API tokens#28
AdaInTheLab merged 1 commit intomasterfrom
ledger-admin-tokens-and-notes-hardening

Conversation

@AdaInTheLab
Copy link
Owner

@AdaInTheLab AdaInTheLab commented Jan 7, 2026

🧠 What & Why

This PR adds a dedicated deploy step to publish Lab Notes Markdown files from the main site repo into the lab-api filesystem, enabling the admin-triggered sync workflow.

Previously, Lab Notes existed only in the frontend repo and were not accessible to the API at runtime. This change establishes a clear, explicit handoff:

Main site owns authoring → API owns ingestion & serving

No magic, no implicit coupling.


🔁 What changed

  • Adds an SFTP deploy step to upload src/labnotes/** into:
lab-api/content/labnotes/{locale}/*.md
  • Upload is non-destructive (delete_remote_files: false)
  • Locale folders (en, ko, etc.) are deployed explicitly to prevent:
  • directory flattening
  • cross-locale file collisions
  • Designed to be consumed by the API’s admin-side Sync Markdown → DB endpoint

🧩 How it fits into the system

End-to-end flow after this PR:

  1. Markdown authored in main site repo
  2. GitHub Actions deploy uploads notes into lab-api
  3. Admin clicks Sync Markdown → DB
  4. API ingests Markdown → HTML → SQLite
  5. Public /lab-notes endpoint serves synced notes

Each step is intentional, observable, and reversible.


🛡 Guardrails

  • No runtime auto-sync
  • No cross-repo imports
  • No deploy-time DB mutations
  • Sync remains an explicit admin action

🧪 How to verify

  1. Merge PR
  2. Run main-site deploy
  3. Confirm files exist in:
lab-api/content/labnotes/en
lab-api/content/labnotes/ko
  1. Use Admin → Lab Notes → Sync Markdown → DB
  2. Verify /api/lab-notes reflects new entries

🗒 Notes

This PR intentionally does not modify API behavior or database state.
It only ensures Markdown content is present on the server for ingestion.

Adds new admin pages for managing lab notes and API tokens.

Includes functionality to sync notes from Markdown files,
view and manage notes in a table format, and create/edit notes.

Also introduces an API tokens management page to view
active tokens.

Improves API error handling on the AdminGate
to prevent redirect loops.
@github-actions
Copy link

github-actions bot commented Jan 7, 2026

😼📘 Carmel Epistemic Stamp™

📘 Carmel Epistemic Stamp™
😼📘💬 "Your logic is sound… shockingly."

PR: #28Adds admin pages for notes and API tokens
Author: @AdaInTheLab

This automated judgment has been issued by the Chief Judgment Office (CJO).

@AdaInTheLab AdaInTheLab merged commit 416feee into master Jan 7, 2026
3 checks passed
@AdaInTheLab AdaInTheLab deleted the ledger-admin-tokens-and-notes-hardening branch January 7, 2026 00:33
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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