feat: 작업본·게시 기록 목록을 번호로 오간다

「다음」 버튼 하나뿐이라 뒤로 넘어가면 앞쪽으로 돌아올 수 없었다. 커서
페이지네이션이라 앞으로만 갈 수 있었기 때문이다.

서버가 총 쪽수를 주고(StudioPageMetadata) 목록은 `‹ 1 2 3 ›` 을 그린다.
쪽이 많으면 현재 쪽 좌우 2개씩만 그리고 첫·끝은 늘 남긴다 — 어디에
있든 처음과 끝으로 한 번에 갈 수 있다.

게시 기록은 페이지 이동이 아예 없었다(limit 100 으로 한 번에 다 가져왔다).
작업본과 같은 20개 단위로 맞춘다.

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-08-29 22:07:54 +09:00
co-authored by Claude Opus 5
parent 77125d1c7c
commit df371d38bd
14 changed files with 285 additions and 42 deletions
@@ -2,7 +2,7 @@
"packageId": "@tech-log/management-contract",
"version": "1.0.0",
"digest": "sha256:762aa81e6906469939fddd833c204ed3ca53f0fa96371f18a5ea1edaf76a64e8",
"sourceRevision": "76a7ccb",
"sourceRevision": "d445555",
"operationIds": [
"createCaseDraft",
"getCaseForEdit",
@@ -2,7 +2,7 @@
"packageId": "@tech-log/public-contract",
"version": "2.1.0",
"digest": "sha256:afe415880eb5d6289ae10abf493333c97270c323c16a7245a466d4db4466e630",
"sourceRevision": "76a7ccb",
"sourceRevision": "d445555",
"operationIds": [
"getPublicSite",
"getPublicHome",
@@ -1,8 +1,8 @@
{
"packageId": "@tech-log/studio-contract",
"version": "3.1.0",
"digest": "sha256:96f655d75fc19c535eb87e24f5320fdc382d6d982aaa75b67fe6acbde1ee8ff2",
"sourceRevision": "76a7ccb",
"digest": "sha256:1732dd7749aea49a41d2ef17dfe9896a73e10b1b97d7d0223b3ac530500816f3",
"sourceRevision": "d445555",
"operationIds": [
"getStudioSession",
"getStudioDashboard",
@@ -1343,13 +1343,26 @@ export interface components {
readyToPublish: number;
publications: number;
};
/** @description 목록 화면이 `‹ 1 2 3 ›` 을 그리려면 총 몇 쪽인지 알아야 한다. 커서만으로는 앞으로만 갈 수
* 있어서 뒤로 넘어간 뒤 돌아올 방법이 없었다. 공개 API 의 `PageMetadata` 와 같은 모양이다.
* */
StudioPageMetadata: {
number: number;
size: number;
totalElements: number;
totalPages: number;
hasPrevious: boolean;
hasNext: boolean;
};
DocumentPage: {
items: components["schemas"]["DocumentSummary"][];
nextCursor: string | null;
page: components["schemas"]["StudioPageMetadata"];
};
PublicationPage: {
items: components["schemas"]["PublicationListItem"][];
nextCursor: string | null;
page: components["schemas"]["StudioPageMetadata"];
};
/** @enum {string} */
CatalogEntryType: "TOPIC" | "PROJECT" | "RELATION" | "EVIDENCE";
@@ -1609,6 +1622,8 @@ export interface components {
/** @description Opaque cursor bound to normalized filters and sort */
Cursor: string;
Limit: number;
/** @description 1부터 세는 페이지 번호. 목록 화면이 번호를 그리려면 앞뒤로 오갈 수 있어야 한다. */
Page: number;
DocumentKind: components["schemas"]["RecordKind"];
PublicationStatus: components["schemas"]["PublicationStatus"];
NextAction: components["schemas"]["NextAction"];
@@ -1686,6 +1701,8 @@ export interface operations {
sort?: components["parameters"]["DocumentSort"];
/** @description Opaque cursor bound to normalized filters and sort */
cursor?: components["parameters"]["Cursor"];
/** @description 1부터 세는 페이지 번호. 목록 화면이 번호를 그리려면 앞뒤로 오갈 수 있어야 한다. */
page?: components["parameters"]["Page"];
limit?: components["parameters"]["Limit"];
};
header?: never;
@@ -1977,6 +1994,8 @@ export interface operations {
type?: components["parameters"]["PublicationEventType"];
/** @description Opaque cursor bound to normalized filters and sort */
cursor?: components["parameters"]["Cursor"];
/** @description 1부터 세는 페이지 번호. 목록 화면이 번호를 그리려면 앞뒤로 오갈 수 있어야 한다. */
page?: components["parameters"]["Page"];
limit?: components["parameters"]["Limit"];
};
header?: never;
@@ -148,6 +148,7 @@ paths:
- { $ref: "#/components/parameters/ProjectId" }
- { $ref: "#/components/parameters/DocumentSort" }
- { $ref: "#/components/parameters/Cursor" }
- { $ref: "#/components/parameters/Page" }
- { $ref: "#/components/parameters/Limit" }
responses:
"200": { description: Working-copy cursor page, content: { application/json: { schema: { $ref: "#/components/schemas/DocumentPageEnvelope" } } } }
@@ -348,6 +349,7 @@ paths:
- { $ref: "#/components/parameters/Query" }
- { $ref: "#/components/parameters/PublicationEventType" }
- { $ref: "#/components/parameters/Cursor" }
- { $ref: "#/components/parameters/Page" }
- { $ref: "#/components/parameters/Limit" }
responses:
"200": { description: Publication cursor page, content: { application/json: { schema: { $ref: "#/components/schemas/PublicationPageEnvelope" } } } }
@@ -579,6 +581,7 @@ components:
Query: { name: q, in: query, description: Free-text query normalized as part of the opaque cursor, schema: { type: string, maxLength: 100 } }
Cursor: { name: cursor, in: query, description: Opaque cursor bound to normalized filters and sort, schema: { type: string, minLength: 1, maxLength: 2000 } }
Limit: { name: limit, in: query, schema: { type: integer, minimum: 1, maximum: 100, default: 20 } }
Page: { name: page, in: query, description: 1부터 세는 페이지 번호. 목록 화면이 번호를 그리려면 앞뒤로 오갈 수 있어야 한다., schema: { type: integer, minimum: 1, default: 1 } }
DocumentKind: { name: kind, in: query, schema: { $ref: "#/components/schemas/RecordKind" } }
PublicationStatus: { name: publicationStatus, in: query, schema: { $ref: "#/components/schemas/PublicationStatus" } }
NextAction: { name: nextAction, in: query, schema: { $ref: "#/components/schemas/NextAction" } }
@@ -1791,20 +1794,36 @@ components:
needsValidation: { type: integer, minimum: 0 }
readyToPublish: { type: integer, minimum: 0 }
publications: { type: integer, minimum: 0 }
StudioPageMetadata:
description: |
목록 화면이 `‹ 1 2 3 ›` 을 그리려면 총 몇 쪽인지 알아야 한다. 커서만으로는 앞으로만 갈 수
있어서 뒤로 넘어간 뒤 돌아올 방법이 없었다. 공개 API 의 `PageMetadata` 와 같은 모양이다.
type: object
additionalProperties: false
required: [number, size, totalElements, totalPages, hasPrevious, hasNext]
properties:
number: { type: integer, minimum: 1 }
size: { type: integer, minimum: 1, maximum: 100 }
totalElements: { type: integer, minimum: 0 }
totalPages: { type: integer, minimum: 0 }
hasPrevious: { type: boolean }
hasNext: { type: boolean }
DocumentPage:
type: object
additionalProperties: false
required: [items, nextCursor]
required: [items, nextCursor, page]
properties:
items: { type: array, maxItems: 100, items: { $ref: "#/components/schemas/DocumentSummary" } }
nextCursor: { type: [string, "null"], maxLength: 2000 }
page: { $ref: "#/components/schemas/StudioPageMetadata" }
PublicationPage:
type: object
additionalProperties: false
required: [items, nextCursor]
required: [items, nextCursor, page]
properties:
items: { type: array, maxItems: 100, items: { $ref: "#/components/schemas/PublicationListItem" } }
nextCursor: { type: [string, "null"], maxLength: 2000 }
page: { $ref: "#/components/schemas/StudioPageMetadata" }
# ---------------------------------------------------------------- catalog
CatalogEntryType: { type: string, enum: [TOPIC, PROJECT, RELATION, EVIDENCE] }