feat: 축에 자기 화면을 준다
주제 화면의 네 줄(SPA·Mediator·BFF·Forward-Auth)은 링크인데 눌러도 아무 일이 없었다. 축의 주소를 주제 화면 안의 앵커로 잡아 두어서, 정작 주제 화면에서는 그 링크가 자기 자신을 가리켰다 — 주소만 바뀌고 화면은 그대로였다. 축에 화면을 준다. 결론을 먼저 두고 그 아래 그 축에 걸린 기록만 모은다. 목록 조회에 `variant` 필터를 더해 `record_variant` 로 거른다 — 축 slug 는 주제 안에서만 유일하므로 주제까지 함께 맞춘다. 정적 어댑터는 축으로 거르면 빈 목록을 준다. 축은 사람이 Studio 에서 거는 값이라 픽스처가 지어낼 수 없고, 없는 것을 있는 척하면 이 어댑터로 그린 화면이 서버로 바꿨을 때 달라진다. `RecordFilters` 가 포트와 정적 어댑터에 따로 있어, 포트에 필터가 늘어도 이쪽은 모르는 상태가 됐다 — 메서드 매개변수가 bivariant 라 `satisfies` 가 잡지 못한다. 하나로 합친다. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011nAjrqNHGPNngN4aUbcyvJ
This commit is contained in:
co-authored by
Claude Opus 5
parent
344dadb17a
commit
67a549173d
@@ -20,6 +20,13 @@ const expectedRoutes = [
|
||||
["TECH_LOG_CONCEPT", "/concepts/:slug", "PUBLIC", "TechLogSlugParams", null],
|
||||
["TECH_LOG_QUESTION", "/questions/:slug", "PUBLIC", "TechLogSlugParams", null],
|
||||
["TECH_LOG_TOPIC", "/topics/:slug", "PUBLIC", "TechLogSlugParams", null],
|
||||
[
|
||||
"TECH_LOG_TOPIC_VARIANT",
|
||||
"/topics/:slug/:variant",
|
||||
"PUBLIC",
|
||||
"TechLogTopicVariantParams",
|
||||
null,
|
||||
],
|
||||
["TECH_LOG_PROJECTS", "/projects", "PUBLIC", null, null],
|
||||
["TECH_LOG_PROJECT", "/projects/:slug", "PUBLIC", "TechLogSlugParams", null],
|
||||
["TECH_LOG_PROJECT_RECORDS", "/projects/:slug/records", "PUBLIC", "TechLogSlugParams", null],
|
||||
@@ -57,6 +64,7 @@ const expectedTitles = {
|
||||
TECH_LOG_REFERENCE: "Reference",
|
||||
TECH_LOG_QUESTION: "Open Question",
|
||||
TECH_LOG_TOPIC: "Topic",
|
||||
TECH_LOG_TOPIC_VARIANT: "Topic",
|
||||
TECH_LOG_PROJECTS: "프로젝트",
|
||||
TECH_LOG_PROJECT: "프로젝트",
|
||||
TECH_LOG_PROJECT_RECORDS: "프로젝트 기록",
|
||||
@@ -86,7 +94,7 @@ const expectedTitles = {
|
||||
} as const;
|
||||
|
||||
describe("TechLog route boundary contract", () => {
|
||||
it("freezes the standalone 32-route inventory before runtime installation", () => {
|
||||
it("freezes the standalone 33-route inventory before runtime installation", () => {
|
||||
expect(
|
||||
Object.values(TECH_LOG_ROUTE_REGISTRY).map((definition) => [
|
||||
definition.routeId,
|
||||
@@ -160,7 +168,7 @@ describe("TechLog route boundary contract", () => {
|
||||
for (const locale of ["ko-KR", "en-US"] as const) {
|
||||
const catalog: Readonly<Record<string, string>> =
|
||||
TECH_LOG_MESSAGE_CATALOGS[locale];
|
||||
expect(Object.keys(catalog)).toHaveLength(68);
|
||||
expect(Object.keys(catalog)).toHaveLength(70);
|
||||
for (const [routeId, title] of Object.entries(expectedTitles)) {
|
||||
expect(catalog[`route.${routeId}.title`]).toBe(title);
|
||||
expect(catalog[`route.${routeId}.navigation`]).toBe(title);
|
||||
|
||||
Reference in New Issue
Block a user