Skip to content

fix(catalog): render organisation name in details breadcrumb - #203

Merged
martinyde merged 2 commits into
developfrom
feature/issue-197-breadcrumb-translation-key
Jul 10, 2026
Merged

fix(catalog): render organisation name in details breadcrumb#203
martinyde merged 2 commits into
developfrom
feature/issue-197-breadcrumb-translation-key

Conversation

@martinydeAI

Copy link
Copy Markdown
Collaborator

Links to issues

Fixes #197

Description

The assistant details page breadcrumb rendered
assistant.detail.placeholder_origin verbatim — the key was left as
a placeholder and no Danish translation entry was ever added, so
Symfony's translator fell back to the identifier itself and users
saw the dotted string.

  • templates/assistant/show.html.twig:16 now renders the
    already-computed organization_name variable from line 6, so
    the breadcrumb reads Katalog / <organisation> or
    Katalog / Ingen tilknyttet organisation matching the eyebrow
    line just below.
  • No new translation key needed — the no_organization fallback
    copy is already used by organization_name on line 6.

Screenshot of the result

To be added — please eyeball the breadcrumb on one assistant with
an organisation and one without before merging.

Checklist

  • My code is covered by test cases.
  • My code passes our test (all our tests).
  • My code passes our static analysis suite.
  • My code passes our continuous integration process.

Existing AssistantControllerTest::testRendersDefaultTab() already
asserts that "Aarhus Kommune" appears in the article (header + breadcrumb render the real organisation name), and
testFallbackCopyForUnattachedAssistant() already asserts the
Ingen tilknyttet organisation fallback appears in the body. Both
existing assertions become MORE aligned with reality after the fix
(they previously passed on the header-eyebrow occurrence alone,
with the breadcrumb still leaking the placeholder key). No test
edits needed.


Details - AI specificities

Goal

Stop leaking raw translation identifiers into the UI. The breadcrumb
is one of the first things a visitor sees on an assistant page and a
raw namespace.section.key string undermined confidence in the
catalog.

Scope

  • templates/assistant/show.html.twig — one line (16).

Non-goals

  • No visual redesign of the breadcrumb.
  • No new i18n scaffolding — the missing key was the whole bug.
  • No new tests — the existing controller test already asserts on the
    substring that the fix makes truly present in the breadcrumb.

Decisions

  • Reuse organization_name (already computed on line 6 for the
    eyebrow at line 33) instead of introducing a separate variable or
    keeping a static translation key. The breadcrumb and the eyebrow
    should show the same value; sourcing them from the same variable
    keeps them in lock-step.
  • No new translation entry. The alternative — adding a static
    assistant.detail.placeholder_origin translation — would have
    been the wrong fix because the intent was always to render data,
    not a static label (per the issue's Constraints section).

Verification

  • task coding-standards-check → clean.
  • task test → 685 tests, 2034 assertions, all green.
  • Visual check pending — please load the details page for one
    assistant with an organisation and one without.

Links

The assistant details page breadcrumb rendered the raw translation
identifier `assistant.detail.placeholder_origin` because the key was
left as a placeholder and never wired to a translation entry.
Symfony's translator fell back to the key, leaking a dotted
identifier into the UI.

Replace the placeholder with the already-computed `organization_name`
variable from show.html.twig:6, so the breadcrumb reads
`Katalog / <organisation>` (or `Katalog / Ingen tilknyttet
organisation` on assistants without an organisation), matching the
eyebrow line just below.

Fixes #197

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
martinyde
martinyde previously approved these changes Jul 10, 2026
@martinyde
martinyde merged commit 00d73b4 into develop Jul 10, 2026
5 checks passed
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.

fix(catalog): breadcrumb on assistant details page shows raw translation key

2 participants