fix: 홈 초점의 질문·결정을 고른 프로젝트 것으로 좁힌다

「지금 집중하는 것」은 프로젝트·질문·결정 셋을 각각 고르는 구조였고, 고르는
목록이 전체였다. 그래서 프로젝트만 바꾸면 질문·결정은 이전 프로젝트 것이
그대로 남았다 — 홈에 프로젝트는 Liner 인데 결정은 Keycloak 것이 나왔다.

프로젝트를 고르면 그 프로젝트의 질문·결정만 목록에 온다. 질문은 항목이
`primaryProject` 를 들고 오므로 그것으로 거르고(계약의 ProjectSummary 에는
id 가 없어 공개 경로에서 뽑은 slug 로 맞춘다), 결정은 경로 자체가 프로젝트를
요구하므로 고른 프로젝트의 것만 온다. 프로젝트를 바꾸면 이전 선택은 함께
비운다 — 남겨 두면 같은 어긋남이 다시 난다.

listStudioQuestions·listStudioProjectDecisions 는 계약에 있었지만 기여 목록에
등록되지 않아 부를 수 없었다. 오늘 같은 누락을 세 번째 만난다.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011nAjrqNHGPNngN4aUbcyvJ
This commit is contained in:
DongHyeonka
2026-09-01 15:02:06 +09:00
co-authored by Claude Opus 5
parent d835276296
commit 2b042829cf
5 changed files with 119 additions and 10 deletions
@@ -6,6 +6,8 @@ export type TopicEdit = Schemas["TopicEdit"];
export type ProjectEditResponse = Schemas["ProjectEditResponse"];
export type ProjectIndexItem = Schemas["ProjectIndexItem"];
export type ProjectIndexPage = Schemas["ProjectIndexPage"];
export type QuestionIndexPage = Schemas["QuestionIndexPage"];
export type DecisionResponse = Schemas["DecisionResponse"];
export type ProjectUpdateRequest = Schemas["ProjectUpdateRequest"];
export type CreateDraftRequest = Schemas["CreateDraftRequest"];
export type CreateDraftResponse = Schemas["CreateDraftResponse"];
@@ -219,6 +219,18 @@ const HTTP_CONTRACTS = Object.freeze([
return Object.freeze({ pathValues: NO_PATH, queryEntries: Object.freeze(entries) });
}),
readOperation("getProjectForEdit", `${P}/{id}`, 262_144, byId),
/*
홈 「지금 집중하는 것」 편집기가 프로젝트에 속한 질문·결정만 고르게 하려면 이 둘이 필요하다.
계약에는 있었지만 여기 등록되지 않아 부를 수 없었다.
*/
readOperation("listStudioQuestions", `${D}/questions`, 262_144, (input: never) => {
const value = input as unknown as Readonly<{ page?: number; size?: number }> | undefined;
const entries: (readonly [string, string])[] = [];
if (value?.page !== undefined) entries.push(["page", String(value.page)]);
if (value?.size !== undefined) entries.push(["size", String(value.size)]);
return Object.freeze({ pathValues: NO_PATH, queryEntries: Object.freeze(entries) });
}),
readOperation("listStudioProjectDecisions", `${P}/{id}/decisions`, 262_144, byId),
writeOperation(
"createProject",
"POST",