chore: sync the frontend template from 5434760 to ebea300

Carries 21 template commits: the shared IndexedDB connection/transaction
kernel and the four runtimes moved onto it, the adapter barrel boundary and
the architecture rule that enforces it, the feature adapter contribution
model, `feature-http-binding`, the split of several oversized test files,
and the release identity now derived from the package name.

Product identity is unchanged. The three hard-coded `tech-log-frontend/…`
verifier ids are gone because the template derives them from the package
name and this package is `tech-log-frontend`.

Two decisions worth naming. The platform HTTP executor is the template's
verbatim — it now takes the installed contract so a feature's types flow
through the binding — and TechLog's four gateways, which address operations
by id, reach it through one adapter at the composition root instead of being
rewritten here. And the three derived CI baselines were recomputed from the
merged `config/ci/gates.json` rather than taken from either side: 94 command
definitions, 106 references, 141 artifacts, gate shape `629e5898…`. The
method was checked by first reproducing the pre-merge values from the
pre-merge file.

Verified here: types, lint, architecture, adapter inventory, CI contract,
design system, diagnostics, remediation ledger, browser security and build
all pass; 1789 unit, 152 component, 415 TechLog, 102 integration, 19
reference-feature, 17 recipe and 7 contract tests pass. Five gates stay
red and every one was reproduced at b297d65 first: `check:i18n`,
`check:registries`, `test:runtime-schema`, `verify:documentation` and
`test:sample-removal`.

Full decision record, including what was deliberately not carried and the
five open follow-ups, in `docs/operations/template-sync-2026-09-21.md`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
DongHyeonka
2026-09-21 16:31:05 +09:00
co-authored by Claude Opus 5
parent b297d659f5
commit afde2b1da1
196 changed files with 21854 additions and 9992 deletions
@@ -17,7 +17,7 @@ import {
deriveAsyncState,
type AsyncState,
} from "../../../application/view-models/async-state.ts";
import type { Result } from "../../../application/result.ts";
import type { Result } from "../../../contracts/result.ts";
import {
createFailure,
normalizeUnknownFailure,
+1 -1
View File
@@ -1,4 +1,4 @@
import type { Result } from "../../application/result.ts";
import type { Result } from "../../contracts/result.ts";
import type { AppFailure } from "../../contracts/errors.ts";
import {
formatMessage,
+2 -2
View File
@@ -20,7 +20,7 @@ import {
useLocale,
type MessageKey,
} from "../i18n/index.ts";
import { useApplication } from "../providers/application-provider.tsx";
import { useApplicationRuntime } from "../providers/application-provider.tsx";
import { useSession } from "../providers/session-provider.tsx";
import { useTheme } from "../providers/theme-provider.tsx";
@@ -168,7 +168,7 @@ export function AppShell() {
function PrimaryNavigation({ id }: Readonly<{ id: string }>) {
const { resolve, message } = useLocale();
const { runtime } = useApplication();
const runtime = useApplicationRuntime();
const { pathname } = useLocation();
// §3.5. A feature the runtime document disabled does not advertise itself.
// The router refuses its routes too, so this is presentation, not the switch.
@@ -4,7 +4,11 @@ import {
useContext,
} from "react";
import type { ApplicationApi } from "../../application/create-application.ts";
import type {
ApplicationApi,
ApplicationFeatureId,
ApplicationFeatureInputs,
} from "../../application/ports/in/application-api.ts";
const ApplicationContext = createContext<ApplicationApi | null>(null);
@@ -22,10 +26,47 @@ export function ApplicationProvider({
);
}
export function useApplication(): ApplicationApi {
function useApplicationContext(): ApplicationApi {
const application = useContext(ApplicationContext);
if (!application) {
throw new Error("ApplicationProvider is required");
}
return application;
}
export function useApplicationSession(): ApplicationApi["session"] {
return useApplicationContext().session;
}
export function useApplicationPreferences(): ApplicationApi["preferences"] {
return useApplicationContext().preferences;
}
export function useApplicationDiagnostics(): ApplicationApi["diagnostics"] {
return useApplicationContext().diagnostics;
}
export function useApplicationRuntime(): ApplicationApi["runtime"] {
return useApplicationContext().runtime;
}
export function useApplicationRecovery(): ApplicationApi["recovery"] {
return useApplicationContext().recovery;
}
export function useApplicationFeature<
FeatureId extends ApplicationFeatureId,
>(featureId: FeatureId): ApplicationFeatureInputs[FeatureId] {
return useApplicationContext().features.get(featureId);
}
/**
* Compatibility escape hatch for composition-oriented presentation code.
* New consumers should use the narrow hooks above so dependencies remain
* explicit instead of growing a root-object service locator.
*
* @deprecated Prefer a capability-specific hook.
*/
export function useApplication(): ApplicationApi {
return useApplicationContext();
}
@@ -10,7 +10,7 @@ import type {
ApplicationApi,
SessionState,
} from "../../application/ports/in/application-api.ts";
import { useApplication } from "./application-provider.tsx";
import { useApplicationSession } from "./application-provider.tsx";
export type SessionContextValue = Readonly<{
sessionState: SessionState;
@@ -24,7 +24,7 @@ const SessionContext = createContext<SessionContextValue | null>(null);
export function SessionProvider({
children,
}: Readonly<{ children: ReactNode }>) {
const { session } = useApplication();
const session = useApplicationSession();
const sessionState = useSyncExternalStore(
session.subscribe,
session.getSnapshot,
@@ -13,7 +13,7 @@ import {
normalizeColorSchemePreference,
resolveColorScheme,
} from "../../application/policies/color-scheme.ts";
import { useApplication } from "./application-provider.tsx";
import { useApplicationPreferences } from "./application-provider.tsx";
export type ThemeContextValue = Readonly<{
preference: ColorSchemePreference;
@@ -33,7 +33,7 @@ function systemPrefersDark(): boolean {
export function ThemeProvider({
children,
}: Readonly<{ children: ReactNode }>) {
const { preferences } = useApplication();
const preferences = useApplicationPreferences();
const [preference, updatePreference] = useState<ColorSchemePreference>(
preferences.getColorScheme,
);
+9 -3
View File
@@ -33,7 +33,11 @@ import { ChunkRecoveryBoundary } from "../boundaries/chunk-recovery-boundary.tsx
import { Button, PageHeader } from "../design-system/index.ts";
import { LocaleProvider, useLocale } from "../i18n/index.ts";
import { TECH_LOG_ROUTE_LAYOUTS } from "../../features/tech-log/presentation/tech-log-route-runtime.tsx";
import { useApplication } from "../providers/application-provider.tsx";
import {
useApplicationDiagnostics,
useApplicationRecovery,
useApplicationRuntime,
} from "../providers/application-provider.tsx";
import { SessionProvider, useSession } from "../providers/session-provider.tsx";
import { ThemeProvider } from "../providers/theme-provider.tsx";
import {
@@ -136,7 +140,7 @@ function RouteLifecycle({
}) {
const location = useLocation();
const { message, resolve } = useLocale();
const { diagnostics } = useApplication();
const diagnostics = useApplicationDiagnostics();
useEffect(() => {
document.title = message("route.documentTitle", {
title: resolve(`route.${definition.routeId}.title`),
@@ -305,7 +309,9 @@ function RegisteredRoute<RouteIdValue extends string>({
const params = useParams();
const [search] = useSearchParams();
const location = useLocation();
const { diagnostics, runtime: platformRuntime, recovery } = useApplication();
const diagnostics = useApplicationDiagnostics();
const platformRuntime = useApplicationRuntime();
const recovery = useApplicationRecovery();
// §3.5 (template merge). A feature the runtime document disabled is out of
// service, not merely hidden: withdrawing it from navigation alone would
// leave a typed deep link that still mounts it. The template looked the