From 3ea6905e0038de83d74e7e44aefc287335910a72 Mon Sep 17 00:00:00 2001 From: kric_jspark Date: Wed, 26 Aug 2026 12:27:06 +0900 Subject: [PATCH] =?UTF-8?q?260826=5F01=5FENH:=20notihub=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=EC=9C=BC=EB=A1=9C=20=EC=9D=B8=ED=95=9C=20=ED=9B=84?= =?UTF-8?q?=EC=86=8D=20=EC=A1=B0=EC=B9=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- AGENTS.md | 11 ++++ src/app/api/notification/[[...slug]]/route.ts | 54 +++++++++++++++++-- src/components/dialog/SmsSendDialog.tsx | 35 +++++++++++- src/lib/gwcf/notification.ts | 14 +++++ src/query/notification.ts | 24 ++++++++- src/types/notification.ts | 17 +++++- 6 files changed, 148 insertions(+), 7 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 2e898bb..f4a1e8a 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -251,6 +251,17 @@ When implementation is complete, report in Korean: - Validate external data at runtime; a shared TypeScript type alone does not validate an API response or persisted value. - Prefer named public exports and retain the consumer project's current module system and bundler conventions. +### React Compiler and Manual Memoization + +- `createKriNextConfig` enables `reactCompiler: true` unless the project overrides it; confirm the effective configuration. +- When enabled, rely on React Compiler instead of adding `useMemo`, `useCallback`, or `React.memo` as a routine performance precaution. +- Use manual memoization only for required reference stability, an Effect or third-party contract, compiler-incompatible code, or a measured performance problem. +- Preserve existing memoization unless approved and verified for removal. Use `"use memo"` or `"use no memo"` only for a documented compiler boundary. + +### Project Instruction Budget + +- Keep `.agent/project.md` at or below 8 KiB (8,192 bytes) as the normal target. Do not delete material rules merely to meet the budget; move schemas, endpoint inventories, examples, and temporary issue history to linked project documentation, and keep concise read-routing instructions here. + ### Change Safety - Pin or constrain the package version according to the consumer repository's dependency policy and commit its lockfile changes. diff --git a/src/app/api/notification/[[...slug]]/route.ts b/src/app/api/notification/[[...slug]]/route.ts index 3837f36..d51e34a 100644 --- a/src/app/api/notification/[[...slug]]/route.ts +++ b/src/app/api/notification/[[...slug]]/route.ts @@ -4,6 +4,7 @@ import {errorToResponse} from "@/lib/http-util"; import {createNotiHubApi} from "@/lib/server-api"; import { BulkSendResponse, + CreateTemplateRequest, SaveTemplateRequest, SendSmsBulkRequest, Template, @@ -15,14 +16,31 @@ export const GET = async ( ) => { try { const {slug = []} = await context.params; - const [action, templateIdx] = slug; + const [action, second, third, fourth] = slug; - if (action !== "template" || !templateIdx) { + if (action !== "template") { return NextResponse.json({ message: "Not found" }, { status: 404 }); } const notiHubApi = await createNotiHubApi(); - const template = await notiHubApi.get