diff --git a/src/features/tech-log/adapters/create-tech-log-feature-input.ts b/src/features/tech-log/adapters/create-tech-log-feature-input.ts index f98ba9d..dd19d1a 100644 --- a/src/features/tech-log/adapters/create-tech-log-feature-input.ts +++ b/src/features/tech-log/adapters/create-tech-log-feature-input.ts @@ -11,6 +11,8 @@ import { createHttpStudioAssetGateway } from "./http/http-studio-asset-gateway.t import { createHttpStudioGateway } from "./http/http-studio-gateway.ts"; import type { CsrfTokenProvider } from "./http/studio-session-csrf.ts"; import { createMockStudioAssetGateway } from "./mock/mock-studio-asset-gateway.ts"; +import { createMockManagementGateway } from "./mock/mock-management-gateway.ts"; +import { createMockStudioState } from "./mock/mock-state.ts"; import { createMockStudioGateway } from "./mock/mock-studio-gateway.ts"; import { createHttpManagementGateway } from "./http/http-management-gateway.ts"; import { createHttpPublicContentGateway } from "./http/http-public-content-gateway.ts"; @@ -66,10 +68,6 @@ export function createTechLogFeatureInstalledInput( }), }); - const createStudioGateway = () => - context.studioSource === "MOCK" - ? createMockStudioGateway({ assets: mockAssets }) - : createHttpStudioGateway({ http }); // The public read source switches independently of Studio: the two are // different services, and the combination that matters today is an authoring @@ -79,15 +77,26 @@ export function createTechLogFeatureInstalledInput( ? publicContentQueries : createHttpPublicContentGateway({ http }); - const createManagementGateway = () => - createHttpManagementGateway({ http }); - - const createStudioApplication = () => - createTechLogStudioApplication({ - studio: createStudioGateway(), + // MOCK: one in-memory Studio state per application, shared by the document + // and management gateways, so deleting a draft from the management surface + // also takes it out of the document list. Management used to be HTTP even + // here, and a MOCK build (local development, the e2e and visual builds) + // asked an API that is not there for its topics and projects. + const createStudioApplication = () => { + if (context.studioSource === "MOCK") { + const state = createMockStudioState(); + return createTechLogStudioApplication({ + studio: createMockStudioGateway({ assets: mockAssets, state }), + assets: createStudioAssetGateway(), + management: createMockManagementGateway({ studioState: state }), + }); + } + return createTechLogStudioApplication({ + studio: createHttpStudioGateway({ http }), assets: createStudioAssetGateway(), - management: createManagementGateway(), + management: createHttpManagementGateway({ http }), }); + }; const input: TechLogFeatureInput = Object.freeze({ publicContent, diff --git a/src/features/tech-log/adapters/mock/mock-management-gateway.ts b/src/features/tech-log/adapters/mock/mock-management-gateway.ts new file mode 100644 index 0000000..5bc980b --- /dev/null +++ b/src/features/tech-log/adapters/mock/mock-management-gateway.ts @@ -0,0 +1,588 @@ +import type { + DeletableDocumentKind, + ManagementGateway, +} from "../../application/ports/management-gateway.ts"; +import { ManagementGatewayError } from "../../application/ports/management-gateway-error.ts"; +import type { + IdempotentOptions, + RequestOptions, +} from "../../application/ports/studio-gateway.ts"; +import type { + CreateDraftResponse, + DecisionResponse, + HomeFocusResponse, + ProjectActivityResponse, + ProjectEditResponse, + ProjectIndexItem, + PublishResponse, + ReleaseEditResponse, + ReleaseIndexItem, + TopicEdit, + TopicVariantEdit, +} from "../../contracts/management/contract.ts"; +import type { WorkingCopy } from "../../contracts/studio/contract.ts"; +import { + projects as staticProjects, + releases as staticReleases, +} from "../static/public-content.ts"; +import { FIXTURE_IDS, MOCK_CATALOG } from "./fixtures.ts"; +import { createMockStudioState, type MockStudioState } from "./mock-state.ts"; + +/** + * The MOCK `studioSource` half of the management surface (topics, projects, + * releases, home focus, document deletion). + * + * `create-tech-log-feature-input.ts` used to hand the HTTP gateway to Studio + * whatever the source was, so a MOCK build — local development, the e2e and + * visual builds — sent `/api/v1/studio/session` to an API that is not there + * as soon as the dashboard or an editor asked for its topics. Like the mock + * document gateway, this keeps everything in memory for the life of one + * Studio application and reports failures with the codes the backend uses. + */ + +export type MockManagementDependencies = { + clock: { now(): Date }; + idGenerator: { next(): string }; + /** + * The working copies `deleteDocument` removes and `listQuestions` lists. + * `create-tech-log-feature-input.ts` passes the state of the mock document + * gateway it builds next to this one, so a deleted draft leaves the + * document list too. Defaults to a fresh seed. + */ + studioState: MockStudioState; +}; + +export const DEFAULT_MANAGEMENT_MOCK_NOW = "2026-08-14T01:00:00.000Z"; + +const HOME_FOCUS_ID = "99999999-0000-4000-8000-000000000001"; +const RELEASE_0_1_0 = "99999999-0000-4000-8000-000000000101"; +const PROJECT_IDS: Readonly> = { + "backend-skeleton": FIXTURE_IDS.projectBackend, + "auth-lab": FIXTURE_IDS.projectAuth, +}; +const DOCUMENT_KIND: Readonly> = { + CASE: "deleteCaseDraft", + REFERENCE: "deleteReferenceDraft", + QUESTION: "deleteQuestion", + CONCEPT: "deleteConceptDraft", + SETUP: "deleteSetupDraft", +}; + +const clone = (value: T): T => structuredClone(value); + +function problem(operationId: string, code: string, detail: string) { + return new ManagementGatewayError(operationId, code, detail); +} + +function published(path: string, at: string, version: number) { + return { + state: "ACTIVE" as const, + publishedSourceVersion: version, + hasUnpublishedChanges: false, + canonicalPath: path, + publishedAt: at, + }; +} + +const NEVER_PUBLISHED = Object.freeze({ + state: "NEVER_PUBLISHED" as const, + hasUnpublishedChanges: false, +}); + +function seedTopics(): TopicEdit[] { + return MOCK_CATALOG.filter((entry) => entry.type === "TOPIC").map((entry) => ({ + id: entry.id, + version: 1, + name: entry.label, + slug: entry.publicPath!.slice("/topics/".length), + status: "ACTIVE", + })); +} + +function seedProjects(topics: readonly TopicEdit[], updatedAt: string): ProjectEditResponse[] { + const topicIdBySlug = new Map(topics.map((topic) => [topic.slug, topic.id!])); + return staticProjects.flatMap((project) => { + const id = PROJECT_IDS[project.slug]; + if (!id) return []; + return [ + { + id, + version: 1, + name: project.title, + slug: project.slug, + oneLinePurpose: project.summary, + thesis: project.thesis, + purposeMarkdown: project.summary, + boundaryMarkdown: "", + phase: project.stage, + currentObjective: project.currentGoal, + nextStep: project.nextStep, + technologyLabels: project.topics.map((topic) => topic.name), + workflowStatus: "PUBLISHED", + targetVisibility: "PUBLIC", + publication: published(`/projects/${project.slug}`, updatedAt, 1), + updatedAt, + topicIds: project.topics.flatMap((topic) => { + const topicId = topicIdBySlug.get(topic.slug); + return topicId ? [topicId] : []; + }), + }, + ]; + }); +} + +function seedReleases(): ReleaseEditResponse[] { + return staticReleases.map((release, index) => ({ + id: index === 0 ? RELEASE_0_1_0 : `99999999-0000-4000-8000-${String(101 + index).padStart(12, "0")}`, + version: 1, + expectedVersion: 1, + versionLabel: release.version, + title: release.title, + summary: release.summary, + releasedOn: release.publishedAt.slice(0, 10), + changeTypes: ["FEATURE"], + changesMarkdown: release.changes.map((line) => `- ${line}`).join("\n"), + reasonMarkdown: release.reasons.map((line) => `- ${line}`).join("\n"), + userImpactMarkdown: release.impacts.map((line) => `- ${line}`).join("\n"), + verificationMarkdown: "", + workflowStatus: "PUBLISHED", + publication: published(release.path, release.publishedAt, 1), + })); +} + +function page(operationId: string, items: readonly T[], pageNumber = 0, size = 20) { + if (!Number.isInteger(pageNumber) || pageNumber < 0 || !Number.isInteger(size) || size < 1 || size > 100) { + throw problem(operationId, "REQUEST_VALIDATION_FAILED", "page must be 0 or more and size 1-100."); + } + const totalElements = items.length; + const totalPages = Math.ceil(totalElements / size); + return { + items: clone(items.slice(pageNumber * size, pageNumber * size + size)), + page: { + number: pageNumber, + size, + totalElements, + totalPages, + hasPrevious: pageNumber > 0, + hasNext: pageNumber + 1 < totalPages, + }, + }; +} + +export function createMockManagementGateway( + supplied: Partial = {}, +): ManagementGateway { + let nextId = 9000; + const clock = supplied.clock ?? { now: () => new Date(DEFAULT_MANAGEMENT_MOCK_NOW) }; + const ids = supplied.idGenerator ?? { + next: () => `bbbbbbbb-bbbb-4bbb-8bbb-${String(nextId++).padStart(12, "0")}`, + }; + const studio = supplied.studioState ?? createMockStudioState(); + const now = () => clock.now().toISOString(); + + const topics = new Map(seedTopics().map((topic) => [topic.id!, topic])); + const variants = new Map(); + const projects = new Map(seedProjects([...topics.values()], now()).map((project) => [project.id, project])); + const activities = new Map(); + const decisions = new Map(); + const releases = new Map(seedReleases().map((release) => [release.id, release])); + let homeFocus: HomeFocusResponse = { + id: HOME_FOCUS_ID, + version: 1, + defaultType: "CURRENT_WORK", + currentProjectId: FIXTURE_IDS.projectBackend, + openQuestionId: FIXTURE_IDS.edgeTokenQuestion, + }; + // The same key replays the first outcome, as the backend's idempotency + // store does; a retried create must not make a second draft. + const replay = new Map(); + + async function boundary(options?: RequestOptions) { + options?.signal?.throwIfAborted(); + await Promise.resolve(); + options?.signal?.throwIfAborted(); + } + + async function read(options: RequestOptions | undefined, run: () => T): Promise { + await boundary(options); + return clone(run()); + } + + async function command(options: IdempotentOptions, run: () => T): Promise { + await boundary(options); + if (replay.has(options.idempotencyKey)) return clone(replay.get(options.idempotencyKey) as T); + const value = run(); + replay.set(options.idempotencyKey, clone(value)); + return clone(value); + } + + function found(map: ReadonlyMap, id: string, operationId: string, code: string): T { + const value = map.get(id); + if (value === undefined) throw problem(operationId, code, `${id} does not exist.`); + return value; + } + + function versionOf(current: number | undefined, expected: number | undefined, operationId: string) { + if (expected !== current) { + throw problem(operationId, "VERSION_CONFLICT", `Expected version ${String(expected)}, current ${String(current)}.`); + } + } + + function questionItems() { + return [...studio.documents.values()] + .filter((document: WorkingCopy) => document.kind === "QUESTION") + .map((document: WorkingCopy) => { + const project = document.projectId ? projects.get(document.projectId) : undefined; + const publication = studio.publications.get(document.id); + return { + id: document.id, + question: document.title, + status: "OPEN", + targetVisibility: "PUBLIC", + ...(project?.slug + ? { primaryProject: { name: project.name, slug: project.slug, path: `/projects/${project.slug}` } } + : {}), + updatedAt: document.updatedAt, + version: document.version, + publication: + publication?.status === "PUBLISHED" + ? published(publication.publicPath, document.updatedAt, publication.publishedVersion) + : NEVER_PUBLISHED, + }; + }); + } + + function projectIndexItem(project: ProjectEditResponse): ProjectIndexItem { + return { + id: project.id, + name: project.name, + ...(project.slug ? { slug: project.slug } : {}), + topicIds: project.topicIds ?? [], + phase: project.phase, + workflowStatus: project.workflowStatus, + targetVisibility: project.targetVisibility, + ...(project.currentObjective ? { currentObjective: project.currentObjective } : {}), + ...(project.nextStep ? { nextStep: project.nextStep } : {}), + updatedAt: project.updatedAt, + version: project.version, + publication: project.publication, + }; + } + + function releaseIndexItem(release: ReleaseEditResponse): ReleaseIndexItem { + return { + id: release.id, + versionLabel: release.versionLabel, + title: release.title, + ...(release.releasedOn ? { releasedOn: release.releasedOn } : {}), + workflowStatus: release.workflowStatus, + updatedAt: now(), + version: release.version, + publication: release.publication, + }; + } + + function draft(): CreateDraftResponse { + return { id: ids.next(), status: "DRAFT", version: 1, createdAt: now() }; + } + + return Object.freeze({ + listTopics: (options) => read(options, () => [...topics.values()]), + createTopic: (input, options) => + command(options, () => { + const topic = { ...input, id: ids.next(), version: 1, status: input.status ?? "ACTIVE" }; + delete topic.expectedVersion; + topics.set(topic.id, topic); + return topic; + }), + updateTopic: (id, body, options) => + command(options, () => { + const current = found(topics, id, "updateTopic", "TOPIC_NOT_FOUND"); + versionOf(current.version, body.expectedVersion, "updateTopic"); + const next = { ...body, id, version: current.version! + 1 }; + delete next.expectedVersion; + topics.set(id, next); + return next; + }), + deleteTopic: (id, expectedVersion, options) => + command(options, () => { + const current = found(topics, id, "deleteTopic", "TOPIC_NOT_FOUND"); + versionOf(current.version, expectedVersion, "deleteTopic"); + topics.delete(id); + variants.delete(id); + }), + + listTopicVariants: (topicId, options) => + read(options, () => { + found(topics, topicId, "listTopicVariants", "TOPIC_NOT_FOUND"); + return variants.get(topicId) ?? []; + }), + createTopicVariant: (topicId, body, options) => + command(options, () => { + found(topics, topicId, "createTopicVariant", "TOPIC_NOT_FOUND"); + const variant = { ...body, id: ids.next(), version: 1 }; + delete variant.expectedVersion; + variants.set(topicId, [...(variants.get(topicId) ?? []), variant]); + return variant; + }), + updateTopicVariant: (topicId, variantId, body, options) => + command(options, () => { + const list = variants.get(topicId) ?? []; + const current = list.find((variant) => variant.id === variantId); + if (!current) throw problem("updateTopicVariant", "TOPIC_NOT_FOUND", `${variantId} does not exist.`); + versionOf(current.version, body.expectedVersion, "updateTopicVariant"); + const next = { ...body, id: variantId, version: current.version! + 1 }; + delete next.expectedVersion; + variants.set(topicId, list.map((variant) => (variant.id === variantId ? next : variant))); + return next; + }), + deleteTopicVariant: (topicId, variantId, expectedVersion, options) => + command(options, () => { + const list = variants.get(topicId) ?? []; + const current = list.find((variant) => variant.id === variantId); + if (!current) throw problem("deleteTopicVariant", "TOPIC_NOT_FOUND", `${variantId} does not exist.`); + versionOf(current.version, expectedVersion, "deleteTopicVariant"); + variants.set(topicId, list.filter((variant) => variant.id !== variantId)); + }), + + listProjects: (pageNumber, size, options) => + read(options, () => page("listStudioProjects", [...projects.values()].map(projectIndexItem), pageNumber, size)), + listQuestions: (pageNumber, size, options) => + read(options, () => page("listStudioQuestions", questionItems(), pageNumber, size)), + listProjectDecisions: (projectId, options) => + read(options, () => { + found(projects, projectId, "listProjectDecisions", "PROJECT_NOT_FOUND"); + return decisions.get(projectId) ?? []; + }), + + getProject: (id, options) => + read(options, () => found(projects, id, "getProjectForEdit", "PROJECT_NOT_FOUND")), + createProject: (title, options) => + command(options, () => { + const created = draft(); + projects.set(created.id, { + id: created.id, + version: created.version, + name: title, + phase: "DESIGN", + workflowStatus: "DRAFT", + targetVisibility: "PRIVATE", + publication: NEVER_PUBLISHED, + updatedAt: created.createdAt, + }); + return created; + }), + updateProject: (id, body, options) => + command(options, () => { + const current = found(projects, id, "updateProject", "PROJECT_NOT_FOUND"); + versionOf(current.version, body.expectedVersion, "updateProject"); + const { expectedVersion, ...fields } = body; + void expectedVersion; + const next: ProjectEditResponse = { + ...current, + ...fields, + version: current.version + 1, + updatedAt: now(), + publication: + current.publication.state === "ACTIVE" + ? { ...current.publication, hasUnpublishedChanges: true } + : current.publication, + }; + projects.set(id, next); + return next; + }), + deleteProject: (id, expectedVersion, options) => + command(options, () => { + const current = found(projects, id, "deleteProject", "PROJECT_NOT_FOUND"); + versionOf(current.version, expectedVersion, "deleteProject"); + if (current.publication.state === "ACTIVE") { + throw problem("deleteProject", "CONFLICT", "A published project is unpublished before it is deleted."); + } + projects.delete(id); + activities.delete(id); + decisions.delete(id); + }), + publishProject: (id, expectedVersion, visibility, options) => + command(options, (): PublishResponse => { + const current = found(projects, id, "publishProject", "PROJECT_NOT_FOUND"); + versionOf(current.version, expectedVersion, "publishProject"); + const path = `/projects/${current.slug ?? current.id}`; + const at = now(); + const version = current.version + 1; + projects.set(id, { + ...current, + version, + workflowStatus: "PUBLISHED", + targetVisibility: visibility ?? "PUBLIC", + publication: published(path, at, version), + updatedAt: at, + }); + return { id, status: "PUBLISHED", visibility: visibility ?? "PUBLIC", canonicalPath: path, publishedAt: at, version }; + }), + unpublishProject: (id, expectedVersion, options) => + command(options, () => { + const current = found(projects, id, "unpublishProject", "PROJECT_NOT_FOUND"); + versionOf(current.version, expectedVersion, "unpublishProject"); + const next: ProjectEditResponse = { + ...current, + version: current.version + 1, + workflowStatus: "DRAFT", + publication: { ...current.publication, state: "WITHDRAWN" }, + updatedAt: now(), + }; + projects.set(id, next); + return next; + }), + + listProjectActivities: (id, options) => + read(options, () => { + found(projects, id, "listProjectActivities", "PROJECT_NOT_FOUND"); + return activities.get(id) ?? []; + }), + createProjectActivity: (id, body, options) => + command(options, () => { + const project = found(projects, id, "createProjectActivity", "PROJECT_NOT_FOUND"); + versionOf(project.version, body.expectedProjectVersion, "createProjectActivity"); + const { expectedProjectVersion, ...fields } = body; + void expectedProjectVersion; + const activity: ProjectActivityResponse = { ...fields, id: ids.next(), projectId: id, origin: "MANUAL", version: 1 }; + activities.set(id, [...(activities.get(id) ?? []), activity]); + return activity; + }), + updateProjectActivity: (id, activityId, body, options) => + command(options, () => { + const list = activities.get(id) ?? []; + const current = list.find((activity) => activity.id === activityId); + if (!current) throw problem("updateProjectActivity", "PROJECT_NOT_FOUND", `${activityId} does not exist.`); + versionOf(current.version, body.expectedVersion, "updateProjectActivity"); + const { expectedVersion, ...fields } = body; + void expectedVersion; + const next = { ...current, ...fields, version: current.version + 1 }; + activities.set(id, list.map((activity) => (activity.id === activityId ? next : activity))); + return next; + }), + deleteProjectActivity: (id, activityId, expectedVersion, options) => + command(options, () => { + const list = activities.get(id) ?? []; + const current = list.find((activity) => activity.id === activityId); + if (!current) throw problem("deleteProjectActivity", "PROJECT_NOT_FOUND", `${activityId} does not exist.`); + versionOf(current.version, expectedVersion, "deleteProjectActivity"); + activities.set(id, list.filter((activity) => activity.id !== activityId)); + }), + + getHomeFocus: (options) => read(options, () => homeFocus), + updateHomeFocus: (body, options) => + command(options, () => { + versionOf(homeFocus.version, body.expectedVersion, "updateHomeFocus"); + const { expectedVersion, ...fields } = body; + void expectedVersion; + homeFocus = { id: homeFocus.id, ...fields, version: homeFocus.version + 1 }; + return homeFocus; + }), + + listReleases: (pageNumber, size, options) => + read(options, () => page("listStudioReleases", [...releases.values()].map(releaseIndexItem), pageNumber, size)), + getRelease: (id, options) => + read(options, () => found(releases, id, "getReleaseForEdit", "RELEASE_NOT_FOUND")), + createRelease: (title, options) => + command(options, () => { + const created = draft(); + releases.set(created.id, { + id: created.id, + version: created.version, + expectedVersion: created.version, + versionLabel: "", + title, + summary: "", + changeTypes: [], + changesMarkdown: "", + verificationMarkdown: "", + workflowStatus: "DRAFT", + publication: NEVER_PUBLISHED, + }); + return created; + }), + updateRelease: (id, body, options) => + command(options, () => { + const current = found(releases, id, "updateRelease", "RELEASE_NOT_FOUND"); + versionOf(current.version, body.expectedVersion, "updateRelease"); + const version = current.version + 1; + const next: ReleaseEditResponse = { + ...current, + ...body, + expectedVersion: version, + version, + publication: + current.publication.state === "ACTIVE" + ? { ...current.publication, hasUnpublishedChanges: true } + : current.publication, + }; + releases.set(id, next); + return next; + }), + deleteRelease: (id, expectedVersion, options) => + command(options, () => { + const current = found(releases, id, "deleteRelease", "RELEASE_NOT_FOUND"); + versionOf(current.version, expectedVersion, "deleteRelease"); + if (current.publication.state === "ACTIVE") { + throw problem("deleteRelease", "CONFLICT", "A published release is archived, not deleted."); + } + releases.delete(id); + }), + publishRelease: (id, expectedVersion, options) => + command(options, (): PublishResponse => { + const current = found(releases, id, "publishRelease", "RELEASE_NOT_FOUND"); + versionOf(current.version, expectedVersion, "publishRelease"); + const path = `/releases/${current.versionLabel || current.id}`; + const at = now(); + const version = current.version + 1; + releases.set(id, { + ...current, + version, + expectedVersion: version, + workflowStatus: "PUBLISHED", + publication: published(path, at, version), + }); + return { id, status: "PUBLISHED", visibility: "PUBLIC", canonicalPath: path, publishedAt: at, version }; + }), + archiveRelease: (id, expectedVersion, options) => + command(options, () => { + const current = found(releases, id, "archiveRelease", "RELEASE_NOT_FOUND"); + versionOf(current.version, expectedVersion, "archiveRelease"); + const version = current.version + 1; + const next: ReleaseEditResponse = { + ...current, + version, + expectedVersion: version, + workflowStatus: "ARCHIVED", + publication: { ...current.publication, state: "WITHDRAWN" }, + }; + releases.set(id, next); + return next; + }), + + deleteDocument: (kind, id, expectedVersion, options) => + command(options, () => { + const operationId = DOCUMENT_KIND[kind]; + const document = studio.documents.get(id); + if (!document || document.kind !== kind) { + throw problem(operationId, "DOCUMENT_NOT_FOUND", `${id} does not exist.`); + } + versionOf(document.version, expectedVersion, operationId); + if (studio.publications.get(id)?.status === "PUBLISHED") { + throw problem(operationId, "CONFLICT", "A published document is unpublished before it is deleted."); + } + studio.documents.delete(id); + studio.validations.delete(id); + studio.previews.delete(id); + }), + deleteDecision: (projectId, decisionId, expectedVersion, options) => + command(options, () => { + const list = decisions.get(projectId) ?? []; + const current = list.find((decision) => decision.id === decisionId); + if (!current) throw problem("deleteDecision", "DECISION_NOT_FOUND", `${decisionId} does not exist.`); + versionOf(current.version, expectedVersion, "deleteDecision"); + decisions.set(projectId, list.filter((decision) => decision.id !== decisionId)); + }), + }); +} diff --git a/src/features/tech-log/adapters/mock/mock-studio-gateway.ts b/src/features/tech-log/adapters/mock/mock-studio-gateway.ts index 0005072..3de3a33 100644 --- a/src/features/tech-log/adapters/mock/mock-studio-gateway.ts +++ b/src/features/tech-log/adapters/mock/mock-studio-gateway.ts @@ -39,6 +39,13 @@ export type MockStudioDependencies = { * seeing exactly today's behavior. */ assets: ReadonlyMap; + /** + * The documents, validations, previews and publications this gateway + * serves. `create-tech-log-feature-input.ts` shares one with the mock + * management gateway, whose `deleteDocument` removes drafts from it. + * Defaults to a fresh seed per gateway, as before. + */ + state?: MockStudioState; }; export const DEFAULT_STUDIO_MOCK_NOW = "2026-08-14T01:00:00.000Z"; @@ -136,7 +143,7 @@ export function createMockStudioGateway(supplied: Partial(); const fallback = defaults(assets); const dependencies: MockStudioDependencies = { clock: supplied.clock ?? fallback.clock, idGenerator: supplied.idGenerator ?? fallback.idGenerator, dependencyRevision: supplied.dependencyRevision ?? fallback.dependencyRevision, assets }; - const state: MockStudioState = createMockStudioState(); + const state: MockStudioState = supplied.state ?? createMockStudioState(); async function boundary(options?: RequestOptions) { options?.signal?.throwIfAborted(); await Promise.resolve(); options?.signal?.throwIfAborted(); diff --git a/src/features/tech-log/presentation/public/public-shell.tsx b/src/features/tech-log/presentation/public/public-shell.tsx index 1f7dd8f..bdcc3c2 100644 --- a/src/features/tech-log/presentation/public/public-shell.tsx +++ b/src/features/tech-log/presentation/public/public-shell.tsx @@ -3,6 +3,7 @@ import { Link } from "react-router-dom"; import { publicSiteConfig } from "../../contracts/public-site-config.ts"; import { SiteHeader } from "./components/site-header.tsx"; +import { useRouteArrival } from "./use-route-arrival.ts"; import { TechLogMessage } from "../tech-log-message.tsx"; type PublicShellProps = { @@ -11,6 +12,7 @@ type PublicShellProps = { }; export function PublicShell({ children, currentPath }: PublicShellProps) { + useRouteArrival(); return (
diff --git a/src/features/tech-log/presentation/public/use-route-arrival.ts b/src/features/tech-log/presentation/public/use-route-arrival.ts new file mode 100644 index 0000000..bf7d19b --- /dev/null +++ b/src/features/tech-log/presentation/public/use-route-arrival.ts @@ -0,0 +1,154 @@ +import { useEffect, useRef } from "react"; +import { useLocation, useNavigationType } from "react-router-dom"; + +/** + * What a Public page does when the reader arrives on it: focus, hash target + * and, on back/forward, the scroll position the reader left it at. + * + * The template does this with its router (focus `#main-content`) and its + * `PageHeader` (move focus to the h1, or to the hash target). TechLog's Public + * pages draw their own headings and fill in after their data arrives, so + * nothing did any of it: after a navigation focus stayed on the link that was + * clicked (or on a link inside the closed mobile menu), a link with `#section` + * opened at the top, and Back opened at the top because the browser restores + * the scroll before the page it returns to has drawn. + * + * - On a new path, once the page has drawn (an h1 in `#main-content`, nothing + * `aria-busy`): scroll the hash target into view, then focus it if it takes + * focus, otherwise the h1 (tabindex -1 and `data-route-heading`, so no + * focus ring, as PageHeader's). Focus never scrolls. On the first load, focus moves only if nothing has it yet. + * - Back/forward: the position saved for that history entry is restored once + * the page is tall enough for it. The browser's own restoration is off while + * the Public shell is mounted, since it runs before the page exists. A reload + * keeps the browser's restoration: the mode is set after the page mounts. + * - A query-only change or an in-page `#` link is not an arrival. + * + * jsdom implements no scrolling or layout, so, like the router's scroll reset, + * this does nothing there. + */ + +const SETTLE_TIMEOUT_MS = 5_000; + +/** Scroll position per history entry (`location.key`), for this tab's session. */ +const positions = new Map(); + +const inBrowser = () => + typeof navigator !== "undefined" && + !navigator.userAgent.toLowerCase().includes("jsdom"); + +function hashTarget(hash: string): HTMLElement | null { + if (hash.length < 2) return null; + try { + return document.getElementById(decodeURIComponent(hash.slice(1))); + } catch { + return null; + } +} + +function pageHeading(): HTMLElement | null { + return document.querySelector("#main-content h1"); +} + +function pageDrawn(hash: string): boolean { + if (document.querySelector('.site-frame [aria-busy="true"]')) return false; + return pageHeading() !== null && (hash.length < 2 || hashTarget(hash) !== null); +} + +/** Calls `ready` once `done()` holds, or when it gives up waiting. */ +function waitFor(done: () => boolean, signal: AbortSignal, ready: () => void): void { + const deadline = performance.now() + SETTLE_TIMEOUT_MS; + const check = () => { + if (signal.aborted) return; + if (done() || performance.now() > deadline) { + ready(); + return; + } + requestAnimationFrame(check); + }; + check(); +} + +function focusOwnedByRoute(): boolean { + const active = document.activeElement; + return ( + active === null || + active === document.body || + active === document.documentElement || + active === document.getElementById("main-content") + ); +} + +export function useRouteArrival(): void { + const { pathname, hash, key } = useLocation(); + const navigationType = useNavigationType(); + const firstArrival = useRef(true); + const lastScroll = useRef(0); + const lastKey = useRef(key); + + // The entry being left keeps the position the reader last scrolled to. It + // is taken while rendering the new entry, before its DOM replaces the old + // page: a shorter page clamps window.scrollY as soon as it is committed. + if (lastKey.current !== key) { + positions.set(lastKey.current, lastScroll.current); + lastKey.current = key; + } + + useEffect(() => { + if (!inBrowser()) return undefined; + const { history } = window; + const previous = history.scrollRestoration; + history.scrollRestoration = "manual"; + lastScroll.current = window.scrollY; + const onScroll = () => { + lastScroll.current = window.scrollY; + }; + window.addEventListener("scroll", onScroll, { passive: true }); + return () => { + window.removeEventListener("scroll", onScroll); + history.scrollRestoration = previous; + }; + }, []); + + useEffect(() => { + if (!inBrowser()) return undefined; + const first = firstArrival.current; + firstArrival.current = false; + const controller = new AbortController(); + const restoreTo = navigationType === "POP" ? positions.get(key) : undefined; + if (restoreTo !== undefined) { + // A reader who scrolls, types or taps while the page fills in has + // chosen a position; the saved one no longer applies. + for (const type of ["wheel", "touchstart", "keydown", "pointerdown"] as const) { + window.addEventListener(type, () => controller.abort(), { + passive: true, + once: true, + signal: controller.signal, + }); + } + } + waitFor(() => pageDrawn(hash), controller.signal, () => { + if (restoreTo !== undefined) { + waitFor( + () => document.documentElement.scrollHeight - window.innerHeight >= restoreTo, + controller.signal, + () => window.scrollTo({ top: restoreTo, left: 0, behavior: "auto" }), + ); + } + const target = hashTarget(hash); + if (target && restoreTo === undefined) target.scrollIntoView(); + if (first && !focusOwnedByRoute()) return; + const heading = pageHeading(); + const focusTarget = target && target.tabIndex >= 0 ? target : heading; + if (!focusTarget) return; + if (focusTarget === heading) { + // As PageHeader's: reachable by script only, and `[data-route-heading]` + // draws no focus ring (globals.css, 3374f28) since it cannot be tabbed to. + if (!heading.hasAttribute("tabindex")) heading.tabIndex = -1; + heading.setAttribute("data-route-heading", ""); + } + focusTarget.focus({ preventScroll: true }); + }); + return () => controller.abort(); + // eslint-disable-next-line react-hooks/exhaustive-deps -- only a new path (or the first load) is an arrival; see above + }, [pathname]); +} diff --git a/src/features/tech-log/presentation/studio/components/home-focus-editor.tsx b/src/features/tech-log/presentation/studio/components/home-focus-editor.tsx index 107206c..41a16e5 100644 --- a/src/features/tech-log/presentation/studio/components/home-focus-editor.tsx +++ b/src/features/tech-log/presentation/studio/components/home-focus-editor.tsx @@ -39,6 +39,19 @@ const HOME_FOCUS_SCHEMA = z.object({ decisionId: z.string(), }); +/** + * One object for the life of the module. useAppForm's `reset` depends on + * `defaultValues`, and the effect below resets the form when `reset` changes: + * a literal here made a new `reset` every render, so as soon as a home focus + * loaded the editor reset itself, re-rendered and reset again without end. + * release-editor.tsx keeps its defaults the same way (EMPTY_RELEASE_DRAFT). + */ +const EMPTY_HOME_FOCUS = Object.freeze({ + projectId: "", + questionId: "", + decisionId: "", +}); + export function HomeFocusEditor() { const copy = useTechLogCopy(); const { setRequestAnnouncement } = useStudio(); @@ -51,11 +64,7 @@ export function HomeFocusEditor() { const form = useAppForm({ schema: HOME_FOCUS_SCHEMA, - defaultValues: { - projectId: "", - questionId: "", - decisionId: "", - }, + defaultValues: EMPTY_HOME_FOCUS, allowedServerFields: ["projectId", "questionId", "decisionId"] as const, mapToCommand(values) { return { diff --git a/src/features/tech-log/presentation/styles/studio-editor.css b/src/features/tech-log/presentation/styles/studio-editor.css index 1ec37de..b7dcec1 100644 --- a/src/features/tech-log/presentation/styles/studio-editor.css +++ b/src/features/tech-log/presentation/styles/studio-editor.css @@ -1867,6 +1867,11 @@ .studio-app .studio-asset-kind-field--compact { display: flex; } +/* The block gutter (drag handle, block actions) sits in the page's side + margin, outside the reading column. It must not be wider than that margin + or the whole page scrolls sideways: the side margin is 38px or more from + 936px up, 24px below that (single-surface .studio-main is 100% - 48px) and + 14px at 760px and below (100% - 28px). See the two media rules below. */ .studio-app .studio-block-editor { position: relative; margin: 0 -38px; @@ -1890,6 +1895,18 @@ border-radius: 5px; } +@media (max-width: 935px) { + .studio-app .studio-block-editor { + margin-inline: -24px; + padding-inline: 24px; + } + + .studio-app .studio-authoring-block { + grid-template-columns: 20px minmax(0, 1fr) auto; + margin-inline: -24px -6px; + } +} + .studio-app .studio-authoring-block:hover, .studio-app .studio-authoring-block[data-active] { background: color-mix(in srgb, var(--canvas) 56%, transparent); @@ -2369,13 +2386,13 @@ .studio-app .studio-inline-asset-actions { justify-content: flex-start; } .studio-app .studio-block-editor { - margin-inline: -18px; - padding-inline: 18px; + margin-inline: -14px; + padding-inline: 14px; } .studio-app .studio-authoring-block { - grid-template-columns: 22px minmax(0, 1fr); - margin-inline: -18px 0; + grid-template-columns: 14px minmax(0, 1fr); + margin-inline: -14px 0; } .studio-app .studio-authoring-block__actions { display: none; } diff --git a/tests/browser-capabilities/browser-files.spec.ts b/tests/browser-capabilities/browser-files.spec.ts index 14c2678..aa7ceb0 100644 --- a/tests/browser-capabilities/browser-files.spec.ts +++ b/tests/browser-capabilities/browser-files.spec.ts @@ -272,7 +272,9 @@ test("hands a bounded generated Blob to the real browser download path", async ( }); const state = globalThis as typeof globalThis & { __browserDownloadResult?: Promise; + __browserDownloadRuntime?: { dispose(): void }; }; + state.__browserDownloadRuntime = runtime; button.addEventListener("click", () => { state.__browserDownloadResult = runtime.downloads .deliver({ @@ -298,8 +300,7 @@ test("hands a bounded generated Blob to the real browser download path", async ( maxBufferedBytes: 1024, signal: new AbortController().signal, onProgress() {}, - }) - .finally(() => runtime.dispose()); + }); }); }); @@ -313,11 +314,19 @@ test("hands a bounded generated Blob to the real browser download path", async ( for await (const chunk of stream) { chunks.push(Buffer.from(chunk)); } + // dispose() revokes every live object URL at once. It used to run as soon + // as deliver() handed the URL to the anchor; WebKit starts the download + // after that, so it sometimes met a revoked URL and never started (no + // "download" event within the test timeout). The runtime is disposed once + // the browser has the file. const result = await page.evaluate(async () => { const state = globalThis as typeof globalThis & { __browserDownloadResult?: Promise; + __browserDownloadRuntime?: { dispose(): void }; }; - return await state.__browserDownloadResult; + const delivered = await state.__browserDownloadResult; + state.__browserDownloadRuntime?.dispose(); + return delivered; }); expect(download.suggestedFilename()).toBe("report.bin"); diff --git a/tests/browser-capabilities/indexeddb-runtime.spec.ts b/tests/browser-capabilities/indexeddb-runtime.spec.ts index e3fa690..84812c0 100644 --- a/tests/browser-capabilities/indexeddb-runtime.spec.ts +++ b/tests/browser-capabilities/indexeddb-runtime.spec.ts @@ -182,6 +182,15 @@ async function startLifecycleRuntime( __indexedDbLifecycleRuntime?: unknown; } ).__indexedDbLifecycleRuntime = runtime; + // Every status the runtime passes through, so a short-lived one (BLOCKED + // lasts blockedTimeoutMs) is seen however late the test looks. + const statuses: unknown[] = []; + runtime.subscribeStatus((status) => statuses.push(status)); + ( + globalThis as unknown as { + __indexedDbLifecycleStatuses?: unknown[]; + } + ).__indexedDbLifecycleStatuses = statuses; const opening = runtime.open(); ( globalThis as unknown as { @@ -240,6 +249,17 @@ async function lifecycleStatus(page: Page): Promise { }); } +async function lifecycleStatuses(page: Page): Promise { + return await page.evaluate( + () => + ( + globalThis as unknown as { + __indexedDbLifecycleStatuses?: unknown[]; + } + ).__indexedDbLifecycleStatuses ?? [], + ); +} + async function closeLifecycleRuntime(page: Page): Promise { await page.evaluate(() => { const runtime = ( @@ -1021,9 +1041,12 @@ test("fails a blocked v2 upgrade closed, then closes its late connection after t expect(blocker).toBe("OPEN"); await startLifecycleRuntime(page, name, 2, 500); + // BLOCKED lasts 500 ms. Polling getStatus() from the test (100, 250, 500, + // 1000 ms apart) missed it whenever the blocked event came late, as it + // sometimes does in WebKit, and then saw only the CLOSED that follows. await expect - .poll(async () => await lifecycleStatus(page)) - .toEqual({ + .poll(async () => await lifecycleStatuses(page)) + .toContainEqual({ kind: "BLOCKED", currentVersion: 1, targetVersion: 2, diff --git a/tests/e2e/boot-module-failure.spec.ts b/tests/e2e/boot-module-failure.spec.ts index cbbbbfe..74ebf8c 100644 --- a/tests/e2e/boot-module-failure.spec.ts +++ b/tests/e2e/boot-module-failure.spec.ts @@ -50,6 +50,9 @@ test("shows the boot error shell when a module throws while it evaluates", async await page.goto(`${server.origin}/`); const shell = page.getByRole("alert"); + // The boot error shell replaces the loading shell once the boot has + // failed; see scroll-restoration.spec.ts for why this is not a 5 s window. + await shell.waitFor(); await expect(shell).toContainText("애플리케이션을 시작할 수 없습니다."); await expect(shell).toContainText("BOOT_UNEXPECTED_FAILURE"); await expect(shell).toContainText("TypeError"); diff --git a/tests/e2e/old-tab-chunk-recovery.spec.ts b/tests/e2e/old-tab-chunk-recovery.spec.ts index e23f66a..b7f51b8 100644 --- a/tests/e2e/old-tab-chunk-recovery.spec.ts +++ b/tests/e2e/old-tab-chunk-recovery.spec.ts @@ -93,6 +93,8 @@ test("an old tab reloads once into the new build, then stops reloading", async ( const server = await startBuildServer(builds.dist); try { await page.goto(`${server.origin}/`); + // The app draws after the document loads; see scroll-restoration.spec.ts. + await page.locator(".site-frame").waitFor(); await expect( page.getByRole("link", { name: PLATFORM.navigationLabel!, exact: true }), ).toBeVisible(); @@ -107,7 +109,11 @@ test("an old tab reloads once into the new build, then stops reloading", async ( .getByRole("link", { name: PLATFORM.navigationLabel!, exact: true }) .click(); - await expect(page.getByRole("heading", { name: PLATFORM.title })).toBeVisible(); + // The page's h1: the home page the tab is still on has an h2 「프로젝트」 + // of its own, which matched before the reload had happened. + await expect( + page.getByRole("heading", { level: 1, name: PLATFORM.title }), + ).toBeVisible(); expect(loads).toBe(1); const served = server.served.map((entry) => entry.path); expect(served).not.toContain(aPlatform); diff --git a/tests/e2e/production-csp.spec.ts b/tests/e2e/production-csp.spec.ts index 811ce0e..1ed1822 100644 --- a/tests/e2e/production-csp.spec.ts +++ b/tests/e2e/production-csp.spec.ts @@ -51,6 +51,8 @@ async function cspViolations(page: Page): Promise { test("boots and changes route under the production security headers", async ({ page }) => { const response = await page.goto("/"); + // The app draws after the document loads; see scroll-restoration.spec.ts. + await page.locator(".site-frame").waitFor(); expect(response?.headers()["content-security-policy"]).toBe( securityHeaders["Content-Security-Policy"], ); diff --git a/tests/e2e/scroll-restoration.spec.ts b/tests/e2e/scroll-restoration.spec.ts index b96b8d8..7e4c979 100644 --- a/tests/e2e/scroll-restoration.spec.ts +++ b/tests/e2e/scroll-restoration.spec.ts @@ -1,9 +1,14 @@ import { expect, test, type Page } from "../support/browser/strict-browser-test.ts"; +import { gotoTechLog } from "../support/browser/tech-log-fixtures.ts"; const scrollY = (page: Page) => page.evaluate(() => Math.round(window.scrollY)); // Template sync (af3d8e6). Upstream scrolls its long example page; this product // deleted it, and a TechLog Case (about 6,000px at 1280x720) is the long page. +// Pages open through gotoTechLog, like the rest of this product's browser +// tests: it waits for the app to draw. After a bare page.goto the first +// expectation had 5 s for that, which WebKit on the desktop host sometimes +// needs more than while the other workers run. const LONG_PAGE = "/cases/collection-fetch-join-pagination"; const LONG_PAGE_TITLE = "컬렉션 Fetch Join과 페이징은 왜 충돌하는가"; @@ -12,17 +17,20 @@ const LONG_PAGE_TITLE = "컬렉션 Fetch Join과 페이징은 왜 충돌하는 // scrolls. test("restores the scroll position when navigating back", async ({ page }) => { const heading = page.getByRole("heading", { level: 1 }); - await page.goto(LONG_PAGE); + await gotoTechLog(page, LONG_PAGE); await expect(heading).toHaveText(LONG_PAGE_TITLE); await expect(page.locator("main [aria-busy='true']")).toHaveCount(0); await expect(page.locator("#remaining-cost")).toBeAttached(); await page.evaluate(() => window.scrollTo(0, 900)); await expect.poll(() => scrollY(page)).toBe(900); + // TechLog's header is not sticky, so a real click first scrolls up to the + // link and the reader leaves from the top. The click is dispatched where the + // reader is, so the page is left at 900. await page .getByRole("navigation", { name: "주요 탐색" }) .getByRole("link", { name: "프로젝트" }) - .click(); + .dispatchEvent("click"); await expect(heading).toHaveText("프로젝트"); await expect.poll(() => scrollY(page)).toBe(0); @@ -35,7 +43,7 @@ test("restores the scroll position when navigating back", async ({ page }) => { test("opens a hash link at its target below the sticky header", async ({ page, }) => { - await page.goto(`${LONG_PAGE}#separate-loading`); + await gotoTechLog(page, `${LONG_PAGE}#separate-loading`); const target = page.locator("#separate-loading"); await expect(target).toBeInViewport(); const top = await target.evaluate((element) => diff --git a/tests/e2e/tech-log-accessibility.spec.ts b/tests/e2e/tech-log-accessibility.spec.ts index 67d7487..1ad0ab8 100644 --- a/tests/e2e/tech-log-accessibility.spec.ts +++ b/tests/e2e/tech-log-accessibility.spec.ts @@ -45,7 +45,9 @@ test("dirty-leave dialog is labelled, traps focus, and restores the invoking lin "/studio/documents/11111111-1111-4111-8111-111111111111/edit", ); await page.getByLabel("요약").fill("저장하지 않은 접근성 검증 변경"); - const trigger = page.getByRole("link", { name: "게시 기록", exact: true }).first(); + const trigger = page + .getByRole("navigation", { name: "Studio 주 탐색" }) + .getByRole("link", { name: "게시", exact: true }); await trigger.click(); const dialog = page.getByRole("dialog", { name: "저장하지 않은 변경" }); await expect(dialog).toBeVisible(); @@ -71,7 +73,10 @@ test("open Public search and Studio leave dialogs have no blocking Axe findings" "/studio/documents/11111111-1111-4111-8111-111111111111/edit", ); await page.getByLabel("요약").fill("dialog axe state"); - await page.getByRole("link", { name: "게시 기록", exact: true }).first().click(); + await page + .getByRole("navigation", { name: "Studio 주 탐색" }) + .getByRole("link", { name: "게시", exact: true }) + .click(); results = await new AxeBuilder({ page }) .include("dialog") .withTags(["wcag2a", "wcag2aa", "wcag21a", "wcag21aa"]) diff --git a/tests/e2e/tech-log-responsive.spec.ts b/tests/e2e/tech-log-responsive.spec.ts index 1e89ff4..3d1612a 100644 --- a/tests/e2e/tech-log-responsive.spec.ts +++ b/tests/e2e/tech-log-responsive.spec.ts @@ -34,6 +34,9 @@ for (const width of [1050, 1024, 980, 900, 820, 768, 767, 420, 390, 375] as cons page, "/studio/documents/11111111-1111-4111-8111-111111111111/edit", ); + // The body's block editor draws after the rest of the form. Measured + // before it, the page never overflowed; its gutter is what overflowed. + await page.locator("section.studio-block-editor").waitFor(); const dimensions = await horizontalOverflow(page); expect(dimensions.scrollWidth).toBeLessThanOrEqual(dimensions.clientWidth); await expect(page.getByRole("heading", { level: 1 })).toBeVisible(); diff --git a/tests/features/tech-log/mock-management-gateway.test.ts b/tests/features/tech-log/mock-management-gateway.test.ts new file mode 100644 index 0000000..4c93d69 --- /dev/null +++ b/tests/features/tech-log/mock-management-gateway.test.ts @@ -0,0 +1,124 @@ +import assert from "node:assert/strict"; +import { test } from "vitest"; + +import { createTechLogFeatureInstalledInput } from "../../../src/features/tech-log/adapters/create-tech-log-feature-input.ts"; +import { FIXTURE_IDS } from "../../../src/features/tech-log/adapters/mock/fixtures.ts"; +import { createMockManagementGateway } from "../../../src/features/tech-log/adapters/mock/mock-management-gateway.ts"; +import { createMockStudioState } from "../../../src/features/tech-log/adapters/mock/mock-state.ts"; +import { ManagementGatewayError } from "../../../src/features/tech-log/application/ports/management-gateway-error.ts"; +import { MOCK_STUDIO_INSTALL_CONTEXT } from "../../helpers/studio-install-context.ts"; + +function key(name: string) { + return { idempotencyKey: `mock-management-${name}` }; +} + +async function rejectsWith(promise: Promise, code: string) { + await assert.rejects(promise, (error: unknown) => { + assert.ok(error instanceof ManagementGatewayError); + assert.equal(error.code, code); + return true; + }); +} + +test("MOCK Studio reads its management surface without the HTTP executor", async () => { + const calls: string[] = []; + const { input } = createTechLogFeatureInstalledInput({ + ...MOCK_STUDIO_INSTALL_CONTEXT, + http: Object.freeze({ + async execute(...args: unknown[]) { + calls.push(JSON.stringify(args[0])); + throw new Error("a MOCK Studio call reached the HTTP executor"); + }, + }), + }); + const studio = input.createStudioApplication(); + + const [topics, projects, questions, focus, releases] = await Promise.all([ + studio.managementQueries.listTopics(), + studio.managementQueries.listProjects(), + studio.managementQueries.listQuestions(), + studio.managementQueries.getHomeFocus(), + studio.managementQueries.listReleases(), + ]); + + assert.deepEqual(calls, []); + assert.deepEqual( + topics.map((topic) => topic.slug), + ["jpa", "redis", "authentication"], + ); + assert.deepEqual( + projects.items.map((project) => project.slug), + ["backend-skeleton", "auth-lab"], + ); + assert.deepEqual( + questions.items.map((question) => question.id), + [FIXTURE_IDS.edgeTokenQuestion], + ); + assert.equal(questions.items[0]?.primaryProject?.slug, "auth-lab"); + assert.equal(focus.currentProjectId, FIXTURE_IDS.projectBackend); + assert.deepEqual( + releases.items.map((release) => release.versionLabel), + ["0.1.0"], + ); +}); + +test("the mock refuses a stale version with the backend's codes", async () => { + const gateway = createMockManagementGateway(); + const project = await gateway.getProject(FIXTURE_IDS.projectBackend); + + await rejectsWith( + gateway.updateProject( + project.id, + { + expectedVersion: project.version + 1, + name: project.name, + oneLinePurpose: "", + purposeMarkdown: "", + boundaryMarkdown: "", + phase: project.phase, + technologyLabels: [], + targetVisibility: "PUBLIC", + }, + key("stale"), + ), + "VERSION_CONFLICT", + ); + await rejectsWith(gateway.getProject("99999999-9999-4999-8999-999999999999"), "PROJECT_NOT_FOUND"); + await rejectsWith(gateway.getRelease("99999999-9999-4999-8999-999999999999"), "RELEASE_NOT_FOUND"); +}); + +test("a replayed idempotency key returns the first draft instead of a second one", async () => { + const gateway = createMockManagementGateway(); + const first = await gateway.createProject("새 프로젝트", key("create")); + const again = await gateway.createProject("새 프로젝트", key("create")); + + assert.deepEqual(again, first); + const projects = await gateway.listProjects(); + assert.equal(projects.page.totalElements, 3); +}); + +test("deleting a draft removes it from the shared document state", async () => { + const state = createMockStudioState(); + const gateway = createMockManagementGateway({ studioState: state }); + const draft = state.documents.get(FIXTURE_IDS.conflictCase)!; + + await rejectsWith( + gateway.deleteDocument("CASE", FIXTURE_IDS.fetchJoinCase, state.documents.get(FIXTURE_IDS.fetchJoinCase)!.version, key("published")), + "CONFLICT", + ); + await rejectsWith( + gateway.deleteDocument("REFERENCE", draft.id, draft.version, key("wrong-kind")), + "DOCUMENT_NOT_FOUND", + ); + await gateway.deleteDocument("CASE", draft.id, draft.version, key("delete")); + + assert.equal(state.documents.has(draft.id), false); +}); + +test("an aborted read rejects before it touches the store", async () => { + const gateway = createMockManagementGateway(); + const controller = new AbortController(); + controller.abort(); + + await assert.rejects(gateway.listTopics({ signal: controller.signal }), { name: "AbortError" }); +}); diff --git a/tests/support/browser/strict-browser-test.ts b/tests/support/browser/strict-browser-test.ts index edde745..3a2d408 100644 --- a/tests/support/browser/strict-browser-test.ts +++ b/tests/support/browser/strict-browser-test.ts @@ -16,11 +16,22 @@ import { const FIREFOX_PRETENDARD_NAME_ORDER = /^\[JavaScript Warning: "downloadable font: name: name records are not sorted\. \(font-family: "Pretendard Variable" style:normal weight:45\.\.920 stretch:100 src index:0\) source: http:\/\/127\.0\.0\.1:\d+\/[\w./@-]*PretendardVariable(?:-[\w-]+)?\.woff2"\]$/u; +/** + * Template 1103/11-09. WebKit's guess, three seconds after the load event, + * that a preload went unused. It fires for chunks the page runs a moment + * later, which on the desktop host is often (WebKit takes about 4 s to open a + * page there). The template replaces it with a check of its own that every + * preloaded script ran (preload-use.ts); that check is not ported yet. + */ +const WEBKIT_UNUSED_PRELOAD_GUESS = + /^The resource \S+ was preloaded using link preload but not used within a few seconds from the window's load event\. Please make sure it wasn't preloaded for nothing\.$/u; + function ignoredConsole(message: ConsoleMessage) { return ( message.type() === "warning" && (message.text().includes("NO_COLOR") || - FIREFOX_PRETENDARD_NAME_ORDER.test(message.text())) + FIREFOX_PRETENDARD_NAME_ORDER.test(message.text()) || + WEBKIT_UNUSED_PRELOAD_GUESS.test(message.text())) ); } diff --git a/tests/support/browser/tech-log-fixtures.ts b/tests/support/browser/tech-log-fixtures.ts index 407de7f..ab35fec 100644 --- a/tests/support/browser/tech-log-fixtures.ts +++ b/tests/support/browser/tech-log-fixtures.ts @@ -151,6 +151,11 @@ export async function signInToStudio(page: Page) { await page.locator("header.studio-header").waitFor(); await gate.waitFor({ state: "detached" }); await page.waitForLoadState("networkidle"); + // The screen then loads its data (about 0.3 s, `aria-busy` while it does): + // a screenshot or a measurement taken before that sees the loading state. + await page.waitForFunction( + () => document.querySelector('main [aria-busy="true"]') === null, + ); } /** `gotoTechLog` for a Studio route, signed in. */ diff --git a/tests/unit/build-environment-bundle.test.ts b/tests/unit/build-environment-bundle.test.ts index 848b957..d8ce187 100644 --- a/tests/unit/build-environment-bundle.test.ts +++ b/tests/unit/build-environment-bundle.test.ts @@ -94,6 +94,39 @@ describe("build variables in the bundle (13-06)", () => { expect(reactDom(second)).toEqual(reactDom(first)); }, 120_000); + // 09-03. main.tsx imports the boot-failure screen when the application + // graph throws while its modules evaluate, so that screen must not import a + // chunk holding that graph. installed-feature-messages.ts (the module the + // boot-module-failure e2e makes throw) is found by its error text. + it("draws the boot-failure screen without the application graph", async () => { + const { run, contents } = await build({ VITE_BUILD_ID: "build-probe-boot" }); + expect(run.status).toBe(0); + const chunks = new Map( + contents + .filter(({ file }) => file.endsWith(".js")) + .map(({ file, text }) => [path.basename(file), text]), + ); + const staticImports = (text: string) => + [...text.matchAll(/(?:from|import)\s*"\.\/([\w.-]+\.js)"/gu)].map( + ([, name]) => name!, + ); + const entry = [...chunks.keys()].find((name) => + name.startsWith("render-boot-failure-"), + ); + expect(entry).toBeDefined(); + const reached = new Set(); + const pending = [entry!]; + while (pending.length > 0) { + const name = pending.pop()!; + if (reached.has(name)) continue; + reached.add(name); + pending.push(...staticImports(chunks.get(name) ?? "")); + } + expect( + [...reached].filter((name) => chunks.get(name)?.includes("message key: ")), + ).toEqual([]); + }, 120_000); + it("refuses a VITE_* variable the build does not declare", async () => { const refused = await build({ VITE_PAYMENT_KEY: "sk_live_probe" }); expect(refused.run.status).not.toBe(0); diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-case-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-case-1440-chromium-linux.png index a0ae560..f42083f 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-case-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-case-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-case-360-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-case-360-chromium-linux.png index 8286b9f..0ac30b1 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-case-360-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-case-360-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-explore-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-explore-1440-chromium-linux.png index db72793..127e4b2 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-explore-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-explore-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-explore-360-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-explore-360-chromium-linux.png index 03ea540..09c4d19 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-explore-360-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-explore-360-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-explore-kind-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-explore-kind-1440-chromium-linux.png index a6f8eac..9b1044c 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-explore-kind-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-explore-kind-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-explore-kind-360-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-explore-kind-360-chromium-linux.png index 148185d..2e9a4af 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-explore-kind-360-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-explore-kind-360-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-1440-chromium-linux.png index a5087f8..4d103d8 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-360-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-360-chromium-linux.png index 416b4af..ec947cb 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-360-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-360-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-1024-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-1024-chromium-linux.png index d65e0a8..3fd80a4 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-1024-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-1024-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-1050-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-1050-chromium-linux.png index 5303530..0ba108d 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-1050-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-1050-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-1179-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-1179-chromium-linux.png index 0fecece..835bd60 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-1179-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-1179-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-1180-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-1180-chromium-linux.png index edf94c0..1f8b683 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-1180-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-1180-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-375-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-375-chromium-linux.png index e540e3f..63429ab 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-375-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-375-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-390-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-390-chromium-linux.png index 2374ec8..0d2eaea 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-390-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-390-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-420-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-420-chromium-linux.png index 84b7440..c42696a 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-420-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-420-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-767-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-767-chromium-linux.png index 0a34631..bbcd940 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-767-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-767-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-768-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-768-chromium-linux.png index af2aa34..eaf564c 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-768-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-768-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-820-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-820-chromium-linux.png index 48c3d6a..12f046d 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-820-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-820-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-900-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-900-chromium-linux.png index 633c604..7a728ab 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-900-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-900-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-980-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-980-chromium-linux.png index 49d0d88..2b616b2 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-980-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-home-breakpoint-980-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-profile-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-profile-1440-chromium-linux.png index 8baf33d..3a26e94 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-profile-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-profile-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-profile-360-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-profile-360-chromium-linux.png index a4fe1f8..7725bcf 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-profile-360-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-profile-360-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-project-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-project-1440-chromium-linux.png index 20ae438..d303ece 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-project-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-project-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-project-360-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-project-360-chromium-linux.png index 787f666..fee5905 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-project-360-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-project-360-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-project-activity-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-project-activity-1440-chromium-linux.png index ec9c3ef..6fec62c 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-project-activity-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-project-activity-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-project-activity-360-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-project-activity-360-chromium-linux.png index 2676fcb..3a2c942 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-project-activity-360-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-project-activity-360-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-project-decisions-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-project-decisions-1440-chromium-linux.png index 3a13e28..31f3753 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-project-decisions-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-project-decisions-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-project-decisions-360-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-project-decisions-360-chromium-linux.png index 44cc404..1530555 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-project-decisions-360-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-project-decisions-360-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-project-records-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-project-records-1440-chromium-linux.png index a12d178..a6aa11a 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-project-records-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-project-records-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-project-records-360-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-project-records-360-chromium-linux.png index 046ebf1..d7ca18f 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-project-records-360-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-project-records-360-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-projects-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-projects-1440-chromium-linux.png index 7287cf7..bff63bc 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-projects-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-projects-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-projects-360-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-projects-360-chromium-linux.png index fae9e2a..d5c5208 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-projects-360-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-projects-360-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-cases-collection-fetch-join-pagination-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-cases-collection-fetch-join-pagination-1440-chromium-linux.png index a0ae560..f42083f 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-cases-collection-fetch-join-pagination-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-cases-collection-fetch-join-pagination-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-cases-redis-adapter-ttl-boundary-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-cases-redis-adapter-ttl-boundary-1440-chromium-linux.png index 6e3485f..9dc386f 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-cases-redis-adapter-ttl-boundary-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-cases-redis-adapter-ttl-boundary-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-projects-auth-lab-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-projects-auth-lab-1440-chromium-linux.png index 1777ec8..95a8187 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-projects-auth-lab-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-projects-auth-lab-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-projects-auth-lab-activity-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-projects-auth-lab-activity-1440-chromium-linux.png index a2fc11a..5848aae 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-projects-auth-lab-activity-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-projects-auth-lab-activity-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-projects-auth-lab-decisions-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-projects-auth-lab-decisions-1440-chromium-linux.png index b2f6261..16772b2 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-projects-auth-lab-decisions-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-projects-auth-lab-decisions-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-projects-auth-lab-records-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-projects-auth-lab-records-1440-chromium-linux.png index b1c55a5..10d8282 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-projects-auth-lab-records-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-projects-auth-lab-records-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-projects-backend-skeleton-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-projects-backend-skeleton-1440-chromium-linux.png index 20ae438..d303ece 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-projects-backend-skeleton-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-projects-backend-skeleton-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-projects-backend-skeleton-activity-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-projects-backend-skeleton-activity-1440-chromium-linux.png index ec9c3ef..6fec62c 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-projects-backend-skeleton-activity-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-projects-backend-skeleton-activity-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-projects-backend-skeleton-decisions-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-projects-backend-skeleton-decisions-1440-chromium-linux.png index 3a13e28..31f3753 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-projects-backend-skeleton-decisions-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-projects-backend-skeleton-decisions-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-projects-backend-skeleton-records-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-projects-backend-skeleton-records-1440-chromium-linux.png index a12d178..a6aa11a 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-projects-backend-skeleton-records-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-projects-backend-skeleton-records-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-questions-collection-fetch-join-with-pagination-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-questions-collection-fetch-join-with-pagination-1440-chromium-linux.png index c065021..d49a367 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-questions-collection-fetch-join-with-pagination-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-questions-collection-fetch-join-with-pagination-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-questions-validate-edge-token-again-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-questions-validate-edge-token-again-1440-chromium-linux.png index 02e9405..b4291f0 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-questions-validate-edge-token-again-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-questions-validate-edge-token-again-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-references-jpa-list-fetch-strategy-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-references-jpa-list-fetch-strategy-1440-chromium-linux.png index 2801b76..916dd0c 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-references-jpa-list-fetch-strategy-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-references-jpa-list-fetch-strategy-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-references-state-and-nonce-boundary-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-references-state-and-nonce-boundary-1440-chromium-linux.png index d7a9274..4283dbb 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-references-state-and-nonce-boundary-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-references-state-and-nonce-boundary-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-releases-0-1-0-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-releases-0-1-0-1440-chromium-linux.png index 2cfb575..8875fd1 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-releases-0-1-0-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-releases-0-1-0-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-topics-authentication-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-topics-authentication-1440-chromium-linux.png index e981003..7a1ceeb 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-topics-authentication-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-topics-authentication-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-topics-jpa-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-topics-jpa-1440-chromium-linux.png index 627be10..50fa0da 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-topics-jpa-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-topics-jpa-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-topics-redis-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-topics-redis-1440-chromium-linux.png index d5639a0..41c83a2 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-topics-redis-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-public-fixture-topics-redis-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-question-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-question-1440-chromium-linux.png index 02e9405..b4291f0 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-question-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-question-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-question-360-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-question-360-chromium-linux.png index 9750c12..ac8694c 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-question-360-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-question-360-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-reference-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-reference-1440-chromium-linux.png index d7a9274..4283dbb 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-reference-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-reference-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-reference-360-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-reference-360-chromium-linux.png index ca790e1..0249fa0 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-reference-360-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-reference-360-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-release-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-release-1440-chromium-linux.png index 2cfb575..8875fd1 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-release-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-release-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-release-360-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-release-360-chromium-linux.png index 4329aa9..89ddb86 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-release-360-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-release-360-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-releases-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-releases-1440-chromium-linux.png index 3fb6d6c..95b1846 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-releases-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-releases-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-releases-360-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-releases-360-chromium-linux.png index e978da3..155481e 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-releases-360-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-releases-360-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-search-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-search-1440-chromium-linux.png index 7407a68..c8a7187 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-search-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-search-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-search-360-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-search-360-chromium-linux.png index 09d3697..970170a 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-search-360-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-search-360-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-search-dialog-390-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-search-dialog-390-chromium-linux.png index 3521f9b..8d80db1 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-search-dialog-390-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-search-dialog-390-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-asset-library-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-asset-library-1440-chromium-linux.png index a9e5965..0e3dbc2 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-asset-library-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-asset-library-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-assets-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-assets-1440-chromium-linux.png index a9e5965..0e3dbc2 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-assets-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-assets-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-assets-360-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-assets-360-chromium-linux.png index 1077a8d..8a40316 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-assets-360-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-assets-360-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-case-editor-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-case-editor-1440-chromium-linux.png index 5800963..cf32b6a 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-case-editor-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-case-editor-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-conflict-editor-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-conflict-editor-1440-chromium-linux.png index 8f46fa0..eec2d11 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-conflict-editor-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-conflict-editor-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-current-preview-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-current-preview-1440-chromium-linux.png index 56cf437..e120f71 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-current-preview-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-current-preview-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-current-preview-created-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-current-preview-created-1440-chromium-linux.png index 4cecce9..980b69a 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-current-preview-created-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-current-preview-created-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-dashboard-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-dashboard-1440-chromium-linux.png index 4722109..96efd3a 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-dashboard-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-dashboard-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-dirty-leave-dialog-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-dirty-leave-dialog-1440-chromium-linux.png index 6f0f8d8..8ba3be0 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-dirty-leave-dialog-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-dirty-leave-dialog-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-edit-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-edit-1440-chromium-linux.png index 5800963..cf32b6a 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-edit-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-edit-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-edit-360-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-edit-360-chromium-linux.png index 0a002e7..4f6bf61 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-edit-360-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-edit-360-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-list-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-list-1440-chromium-linux.png index 87e3511..615accd 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-list-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-list-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-new-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-new-1440-chromium-linux.png index 810cb03..1589150 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-new-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-new-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-new-360-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-new-360-chromium-linux.png index 876f5b9..3b8f934 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-new-360-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-new-360-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-preview-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-preview-1440-chromium-linux.png index 56cf437..e120f71 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-preview-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-preview-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-preview-360-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-preview-360-chromium-linux.png index 4ed6c95..5f44a73 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-preview-360-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-preview-360-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-publish-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-publish-1440-chromium-linux.png index 54303cb..cf36afa 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-publish-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-publish-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-publish-360-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-publish-360-chromium-linux.png index bc70b96..fca4541 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-publish-360-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-publish-360-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-validation-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-validation-1440-chromium-linux.png index f42a93b..6e00a6e 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-validation-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-validation-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-validation-360-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-validation-360-chromium-linux.png index d9a57de..fc1360d 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-validation-360-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-document-validation-360-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-documents-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-documents-1440-chromium-linux.png index 87e3511..615accd 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-documents-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-documents-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-documents-360-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-documents-360-chromium-linux.png index 77de12a..868d1d8 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-documents-360-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-documents-360-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-expired-preview-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-expired-preview-1440-chromium-linux.png index 3d3b60f..185b15a 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-expired-preview-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-expired-preview-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-home-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-home-1440-chromium-linux.png index 4722109..96efd3a 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-home-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-home-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-home-360-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-home-360-chromium-linux.png index 0279551..2d9db09 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-home-360-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-home-360-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-immediate-preview-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-immediate-preview-1440-chromium-linux.png deleted file mode 100644 index 5173228..0000000 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-immediate-preview-1440-chromium-linux.png and /dev/null differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-invalid-validation-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-invalid-validation-1440-chromium-linux.png index 05f7ab3..3352d15 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-invalid-validation-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-invalid-validation-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-missing-document-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-missing-document-1440-chromium-linux.png index c52067a..769eff9 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-missing-document-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-missing-document-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-missing-preview-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-missing-preview-1440-chromium-linux.png index 4405150..d2f3d98 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-missing-preview-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-missing-preview-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-missing-publication-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-missing-publication-1440-chromium-linux.png index adb8126..2480269 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-missing-publication-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-missing-publication-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-mobile-menu-390-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-mobile-menu-390-chromium-linux.png index b7d29b0..c7e2029 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-mobile-menu-390-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-mobile-menu-390-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-new-document-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-new-document-1440-chromium-linux.png index 810cb03..1589150 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-new-document-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-new-document-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-not-found-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-not-found-1440-chromium-linux.png index acb246c..c82729c 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-not-found-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-not-found-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-not-found-360-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-not-found-360-chromium-linux.png index de911c6..1594a0a 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-not-found-360-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-not-found-360-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-publication-preview-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-publication-preview-1440-chromium-linux.png index 30500a9..68d560b 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-publication-preview-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-publication-preview-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-publication-preview-360-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-publication-preview-360-chromium-linux.png index d6dfae3..c05e0a3 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-publication-preview-360-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-publication-preview-360-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-publication-snapshot-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-publication-snapshot-1440-chromium-linux.png index 30500a9..68d560b 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-publication-snapshot-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-publication-snapshot-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-publications-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-publications-1440-chromium-linux.png index fee31d6..92bda30 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-publications-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-publications-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-publications-360-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-publications-360-chromium-linux.png index cf095f8..a8dc8b1 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-publications-360-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-publications-360-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-publish-blocked-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-publish-blocked-1440-chromium-linux.png index 4d344bd..42c9774 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-publish-blocked-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-publish-blocked-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-publish-ready-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-publish-ready-1440-chromium-linux.png index 54303cb..cf36afa 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-publish-ready-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-publish-ready-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-question-editor-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-question-editor-1440-chromium-linux.png index b9a420b..13de00a 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-question-editor-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-question-editor-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-reference-editor-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-reference-editor-1440-chromium-linux.png index 6a176a7..7e99d76 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-reference-editor-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-reference-editor-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-unknown-studio-route-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-unknown-studio-route-1440-chromium-linux.png index acb246c..c82729c 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-unknown-studio-route-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-unknown-studio-route-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-unpublish-dialog-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-unpublish-dialog-1440-chromium-linux.png index 8713570..b290dc9 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-unpublish-dialog-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-unpublish-dialog-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-valid-validation-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-valid-validation-1440-chromium-linux.png index f42a93b..6e00a6e 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-valid-validation-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-valid-validation-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-warning-acknowledged-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-warning-acknowledged-1440-chromium-linux.png index f0b8e8e..1839a5d 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-warning-acknowledged-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-studio-warning-acknowledged-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-topic-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-topic-1440-chromium-linux.png index 627be10..50fa0da 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-topic-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-topic-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-topic-360-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-topic-360-chromium-linux.png index 722ccca..a87e835 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-topic-360-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-topic-360-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-case-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-case-1440-chromium-linux.png index 0ca92de..84d92dd 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-case-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-case-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-case-360-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-case-360-chromium-linux.png index 81b897b..cb8b67a 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-case-360-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-case-360-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-explore-kind-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-explore-kind-1440-chromium-linux.png index 0ca92de..6ba0a2e 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-explore-kind-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-explore-kind-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-explore-kind-360-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-explore-kind-360-chromium-linux.png index 81b897b..cb8b67a 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-explore-kind-360-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-explore-kind-360-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-project-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-project-1440-chromium-linux.png index 0ca92de..e44c2e0 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-project-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-project-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-project-360-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-project-360-chromium-linux.png index 81b897b..cb8b67a 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-project-360-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-project-360-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-project-activity-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-project-activity-1440-chromium-linux.png index 0ca92de..e44c2e0 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-project-activity-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-project-activity-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-project-activity-360-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-project-activity-360-chromium-linux.png index 81b897b..cb8b67a 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-project-activity-360-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-project-activity-360-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-project-decisions-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-project-decisions-1440-chromium-linux.png index 0ca92de..e44c2e0 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-project-decisions-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-project-decisions-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-project-decisions-360-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-project-decisions-360-chromium-linux.png index 81b897b..cb8b67a 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-project-decisions-360-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-project-decisions-360-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-project-records-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-project-records-1440-chromium-linux.png index 0ca92de..e44c2e0 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-project-records-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-project-records-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-project-records-360-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-project-records-360-chromium-linux.png index 81b897b..cb8b67a 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-project-records-360-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-project-records-360-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-question-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-question-1440-chromium-linux.png index 0ca92de..84d92dd 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-question-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-question-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-question-360-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-question-360-chromium-linux.png index 81b897b..cb8b67a 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-question-360-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-question-360-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-reference-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-reference-1440-chromium-linux.png index 0ca92de..84d92dd 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-reference-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-reference-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-reference-360-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-reference-360-chromium-linux.png index 81b897b..cb8b67a 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-reference-360-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-reference-360-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-release-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-release-1440-chromium-linux.png index 0ca92de..84d92dd 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-release-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-release-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-release-360-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-release-360-chromium-linux.png index 81b897b..cb8b67a 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-release-360-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-release-360-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-topic-1440-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-topic-1440-chromium-linux.png index 0ca92de..6ba0a2e 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-topic-1440-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-topic-1440-chromium-linux.png differ diff --git a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-topic-360-chromium-linux.png b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-topic-360-chromium-linux.png index 81b897b..cb8b67a 100644 Binary files a/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-topic-360-chromium-linux.png and b/tests/visual/__snapshots__/tech-log.visual.spec.ts-snapshots/tech-log-unknown-topic-360-chromium-linux.png differ diff --git a/tests/visual/tech-log.visual.spec.ts b/tests/visual/tech-log.visual.spec.ts index 4d3a227..6ae1937 100644 --- a/tests/visual/tech-log.visual.spec.ts +++ b/tests/visual/tech-log.visual.spec.ts @@ -60,13 +60,19 @@ for (const [state, path] of TECH_LOG_STUDIO_STATE_PATHS) { }); } +// 6784eb1 (08-20). The server serves every registered Public route pattern, +// so a slug nobody published gets the SPA and its in-shell not-found page, +// not the edge's plain-text "Not Found" (that stays for paths no route +// declares: NOT_FOUND above). for (const [route, path] of TECH_LOG_UNKNOWN_PUBLIC_PATHS) { for (const width of [360, 1440] as const) { - test(`unknown Public ${route} matches the source ${width}px response`, async ({ page }) => { + test(`unknown Public ${route} shows the in-shell not-found at ${width}px`, async ({ page }) => { await page.setViewportSize({ width, height: 1000 }); await gotoTechLog(page, path); - await expect(page.getByText("Not Found", { exact: true })).toBeVisible(); - await expect(page.locator(".site-frame")).toHaveCount(0); + await expect( + page.getByRole("heading", { level: 1, name: "페이지를 찾을 수 없습니다." }), + ).toBeVisible(); + await expect(page.locator(".site-frame")).toHaveCount(1); await expect(page).toHaveScreenshot(`tech-log-unknown-${route}-${width}.png`, { fullPage: true, }); @@ -93,18 +99,6 @@ test("open Studio mobile menu matches the source without a mask", async ({ page }); }); -test("Studio immediate preview matches the source without a mask", async ({ page }) => { - await page.setViewportSize({ width: 1440, height: 1000 }); - await gotoTechLogStudio( - page, - "/studio/documents/11111111-1111-4111-8111-111111111111/edit", - ); - await expect(page.getByRole("region", { name: "즉시 미리보기" })).toBeVisible(); - await expect(page).toHaveScreenshot("tech-log-studio-immediate-preview-1440.png", { - fullPage: true, - }); -}); - test("Studio dirty-leave dialog matches the source without a mask", async ({ page }) => { await page.setViewportSize({ width: 1440, height: 1000 }); await gotoTechLogStudio( @@ -112,7 +106,10 @@ test("Studio dirty-leave dialog matches the source without a mask", async ({ pag "/studio/documents/11111111-1111-4111-8111-111111111111/edit", ); await page.getByLabel("요약").fill("저장하지 않은 시각 검증 변경"); - await page.getByRole("link", { name: "게시 기록", exact: true }).first().click(); + await page + .getByRole("navigation", { name: "Studio 주 탐색" }) + .getByRole("link", { name: "게시", exact: true }) + .click(); await expect( page.getByRole("dialog", { name: "저장하지 않은 변경" }), ).toBeVisible(); diff --git a/vite.config.ts b/vite.config.ts index ef99e85..6000eeb 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -135,27 +135,43 @@ export default defineConfig(({ mode }) => { resolveDependencies: (_filename, deps) => deps.filter((dep) => !dep.includes("route-tech-log-studio")), }, - // Template sync (af3d8e6). One chunking function under the key this - // product already builds with: the template's preload-helper split - // (09-03) first, then TechLog's named route chunks. + // Template sync (af3d8e6): the template's chunk groups, then TechLog's + // named route chunks, in the template's `codeSplitting` form. rolldownOptions: { output: { - // 09-03. The entry now imports the app dynamically, so Vite's preload - // helper would land in the entry chunk and every lazy chunk would - // import the entry, whose hash changes with each build id. - // - // Template 1103/15-06 (af6d0a9f). react-dom and scheduler shared the - // boot-failure chunk with the build id (getBuildConfig), so a release - // that only changed the build id renamed that 190 KB chunk and - // returning visitors downloaded it again. In a chunk of their own they - // keep their name; only boot, the entry and the small boot-failure - // screen, which hold or import the build id, are renamed. - manualChunks: (id: string) => - id.includes("vite/preload-helper") - ? "preload-helper" - : REACT_DOM_MODULE.test(id) - ? "react-dom" - : routeChunkName(id), + codeSplitting: { + groups: [ + // 09-03. The entry now imports the app dynamically, so Vite's + // preload helper would land in the entry chunk and every lazy + // chunk would import the entry, whose hash changes with each + // build id. + { name: "preload-helper", test: /vite[\\/]preload-helper/ }, + // Template 1103/15-06 (af6d0a9f). react-dom and scheduler shared + // the boot-failure chunk with the build id (getBuildConfig), so a + // release that only changed the build id renamed that 190 KB + // chunk and returning visitors downloaded it again. In a chunk of + // their own they keep their name; only boot, the entry and the + // small boot-failure screen, which hold or import the build id, + // are renamed. + { + name: "react-dom", + test: REACT_DOM_MODULE, + includeDependenciesRecursively: false, + }, + // A route page gets its named chunk, its imports do not. The + // `manualChunks` function this replaces is a group that pulls + // every static dependency in: `route-not-found` took React, the + // i18n catalogs and installed-feature-messages.ts with it, and + // the boot-failure screen imports from that chunk. A module that + // threw while the application graph evaluated then took the + // boot-failure screen down too, and the static "loading" shell + // stayed up (boot-module-failure e2e, 09-03). + { + name: (id: string) => routeChunkName(id) ?? null, + includeDependenciesRecursively: false, + }, + ], + }, }, }, },