Skip to content

fix(labels): wire model labels to the backend SiteLabel API - #105

Open
geourjoa wants to merge 3 commits into
mainfrom
fix/wire-model-labels-to-backend
Open

fix(labels): wire model labels to the backend SiteLabel API#105
geourjoa wants to merge 3 commits into
mainfrom
fix/wire-model-labels-to-backend

Conversation

@geourjoa

@geourjoa geourjoa commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Pull request overview

Wires the frontend “model labels” system to read/write label values from the backend SiteLabel API (instead of a local JSON config), and updates the footer + backoffice translations UI to use the new footer label keys.

It's a PR to fix afterward internationalization stuff. Sorry for that. If not merged, all the translations stuff editable from backoffice will be not persistent on container restart.

Changes:

  • Replace local JSON-based model-label persistence with backend fetch/PUT to /api/v1/site-labels/ (with SSR-safe fallback to defaults).
  • Rename footer-related label keys and update footer rendering to use the new lines.
  • Update the backoffice translations page metadata and the internal API route to support the new write flow.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
lib/model-labels.ts Renames footer label keys and updates default localized footer strings.
lib/model-labels-server.ts Implements backend-backed read/write for model labels via apiFetch/authFetch.
components/layout/footer.tsx Switches footer content to render footerLine1, footerLine2, and footerBottomLine.
app/backoffice/translations/page.tsx Updates backoffice field metadata to expose the new footer label keys.
app/api/model-labels/route.ts Updates PUT to write labels via backend and adds error handling.

geourjoa and others added 2 commits August 4, 2026 16:39
model-labels-server.ts read/wrote a local config/model-labels.json file,
completely bypassing apps.common.SiteLabel and its /api/v1/site-labels/
endpoint (backend#139) — so backoffice edits to that table never reached
the rendered site. Point readModelLabels/writeModelLabels at the backend
instead, and align the footer keys to the backend's Key enum
(footerLine1/footerLine2/footerBottomLine) since it hard-rejects unknown
keys on write.

footer.tsx still references the old footerFunded/footerCopyright keys —
left for a follow-up since it needs to decide how to lay out 3 lines
instead of 2.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@geourjoa
geourjoa force-pushed the fix/wire-model-labels-to-backend branch from e55eb8e to 5b0bdfc Compare August 4, 2026 14:50
@geourjoa
geourjoa requested a lite review from Copilot August 4, 2026 15:47

This comment was marked as off-topic.

@geourjoa
geourjoa force-pushed the fix/wire-model-labels-to-backend branch from e9cc87b to d959e42 Compare August 5, 2026 05:11
@geourjoa
geourjoa force-pushed the fix/wire-model-labels-to-backend branch from fc3abc5 to 5ccafb8 Compare August 5, 2026 08:04
@geourjoa
geourjoa marked this pull request as ready for review August 5, 2026 08:06
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.

3 participants