Files
tech-log-frontend/src/features/tech-log/adapters/static/content.ts
T
DongHyeonkaandClaude Opus 5 3510ec013f feat: 프로젝트 화면이 어디서부터 읽을지를 말한다
숫자 셋(기록 12 · 결정 4 · 활동 9)은 이 프로젝트가 얼마나 큰지는 말해도 어디서부터
읽어야 하는지는 말하지 않는다. 세는 자리를 처음 몇 편으로 바꾸고, 숫자는 각 목록으로
가는 줄에 남긴다.

「주요 주제」는 글자 목록이었다. 매퍼가 이름만 남기고 slug 를 버려서 그 주제로 갈 수가
없었는데, 계약은 처음부터 둘 다 주고 있었다.

논지 자리의 제목도 고친다 — 「프로젝트가 지키는 기준」이 아니라 이 프로젝트가 밝힌
것이고, 여러 문단으로 쓸 수 있으므로 산문으로 그린다.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011nAjrqNHGPNngN4aUbcyvJ
2026-09-01 17:19:32 +09:00

148 lines
4.2 KiB
TypeScript

import { projects, publicRecords, releases } from "./public-content.ts";
import { getHomeFocusItems, searchPublicContent } from "./public-query.ts";
export { publicSiteConfig as siteConfig } from "../../contracts/public-site-config.ts";
export type {
FocusKey,
HomeFocusItem as FocusItem,
} from "../../application/ports/public-content-queries.ts";
export const focusItems = getHomeFocusItems();
export type LatestEntry = {
id: string;
typeLabel: string;
title: string;
summary: string;
date: string;
dateTime: string;
topic: string;
project: string;
path: string;
};
const publicRecordByPath = new Map(publicRecords.map((record) => [record.path, record]));
const projectTimeline: ReadonlyArray<LatestEntry> = projects.flatMap((project) =>
project.activity.map((activity) => {
const record = publicRecordByPath.get(activity.recordPath ?? activity.path);
return {
id: activity.id,
typeLabel:
activity.type === "PUBLICATION" && record
? record.kind
: "PROJECT ACTIVITY",
title:
activity.type === "PUBLICATION" && record
? record.title
: activity.title,
summary: activity.summary,
date: activity.date,
dateTime: activity.dateTime,
topic: record?.topic ?? project.topics[0]?.name ?? "",
project: project.title,
path: activity.path,
};
}),
);
const releaseTimeline: ReadonlyArray<LatestEntry> = releases.map((release) => ({
id: `release-${release.version}`,
typeLabel: "RELEASE",
title: release.title,
summary: release.summary,
date: release.publishedLabel,
dateTime: release.publishedAt,
topic: "TechLog",
project: "TechLog",
path: release.path,
}));
export const latestEntries: ReadonlyArray<LatestEntry> = [
...projectTimeline,
...releaseTimeline,
].sort((left, right) => right.dateTime.localeCompare(left.dateTime));
export const exploreEntries = [
{
label: "Case",
description: "문제를 따라가며 검증 과정을 읽습니다",
path: "/explore/cases",
},
{
label: "Reference",
description: "다시 찾을 수 있는 기술 기준을 확인합니다",
path: "/explore/references",
},
{
label: "OpenQuestion",
description: "아직 끝나지 않은 판단과 다음 검증을 봅니다",
path: "/explore/questions",
},
{
label: "Project",
description: "여러 기록을 하나의 시스템 맥락에서 연결합니다",
path: "/projects",
},
] as const;
export const searchEntries = searchPublicContent("");
const fetchJoinCase = publicRecords.find(
(record) =>
record.kind === "CASE" && record.slug === "collection-fetch-join-pagination",
);
if (!fetchJoinCase || fetchJoinCase.kind !== "CASE") {
throw new Error("Missing canonical Fetch Join Case");
}
export const caseDocument = {
title: fetchJoinCase.title,
eyebrow: "Case / JPA / Backend Skeleton",
summary: fetchJoinCase.summary,
problem: fetchJoinCase.problem,
conclusion: fetchJoinCase.conclusion,
environment: fetchJoinCase.environment,
dataset: `Dataset: ${fetchJoinCase.verification}`,
dates: `게시 ${fetchJoinCase.publishedLabel} · 마지막 검증 ${fetchJoinCase.lastVerifiedLabel}`,
} as const;
export const documentHeadings = fetchJoinCase.sections.map(({ id, title }) => ({
id,
label: title,
}));
export const caseSections = fetchJoinCase.sections;
export const documentRelations = fetchJoinCase.relations;
export const failedQueryCode = `@Query("""
select distinct fi
from FeedItem fi
join fetch fi.user
join fetch fi.page
left join fetch fi.highlights h
where fi.visibility = :visibility
order by fi.firstHighlightedAt desc, fi.id desc
""")
List<FeedItem> findFeed(
@Param("visibility") Visibility visibility,
Pageable pageable
);`;
export const splitQueryCode = `Page<FeedItemRow> page = feedItemQuery.findPage(
Visibility.PUBLIC,
PageRequest.of(0, 20, Sort.by(
Sort.Order.desc("firstHighlightedAt"),
Sort.Order.desc("id")
))
);
List<UUID> feedItemIds = page.getContent().stream()
.map(FeedItemRow::id)
.toList();
Map<UUID, List<HighlightRow>> highlights =
highlightQuery.findLatestByFeedItemIds(feedItemIds, 3);`;