본문으로 건너뛰기
cccskills
무료GitHub에 공개

ns-intercepted-route-using-tanstack-start

Implement masked modal routes in NowStack Mobile web-app. Use for TanStack Start route masks, shareable detail URLs, back-to-close, and refresh-to-page behavior.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md3.5 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Intercepted Route Using TanStack Start

<objective> Implement a web detail flow that opens as a modal during client navigation while the browser URL shows the real detail route. Refreshing or directly visiting that URL must render a normal full page. </objective> <scope> This skill applies only to `web-app/`.

Current route shape:

  • Public: /, /privacy, /cgv, /support
  • User app: /app
  • Admin: /admin (redirects to /admin/users), /admin/users, /admin/users/$userId

The examples below use a hypothetical /admin/items list/detail flow to illustrate the pattern. </scope>

<behavior> For an admin items list/detail flow:
  1. User starts on /admin/items.
  2. User clicks a row.
  3. Browser URL becomes /admin/items/$itemId.
  4. UI keeps the /admin/items list visible and opens a modal/sheet with the detail.
  5. Back or close returns to /admin/items.
  6. Refresh or direct visit on /admin/items/$itemId renders the full detail page. </behavior>

<core_pattern> Navigate to the source route internally, store modal state in source route search, and mask the visible URL as the destination route.

<Link
  to="/admin/items"
  search={{ itemId: item._id }}
  mask={{
    to: "/admin/items/$itemId",
    params: { itemId: item._id },
    unmaskOnReload: true,
  }}
  resetScroll={false}
>
  View
</Link>

The source route owns modal state:

type ItemsSearch = {
  itemId?: string;
};

export const Route = createFileRoute("/admin/items")({
  validateSearch: (search: Record<string, unknown>): ItemsSearch => ({
    itemId:
      typeof search.itemId === "string" && search.itemId.length > 0
        ? search.itemId
        : undefined,
  }),
  component: AdminItemsPage,
});

The destination route remains a real route:

export const Route = createFileRoute("/admin/items/$itemId")({
  component: AdminItemDetailPage,
});

</core_pattern>

<closing> Use `location.maskedLocation` before deciding whether close should call `history.back()`.
const router = useRouter();
const location = useLocation();

const closeModal = () => {
  if (location.maskedLocation) {
    router.history.back();
    return;
  }

  void router.navigate({
    to: "/admin/items",
    search: {},
    replace: true,
  });
};

If the modal has an "Open full page" action, navigate directly and do not call the close handler first:

void router.navigate({
  to: "/admin/items/$itemId",
  params: { itemId },
  replace: true,
});
</closing> <rules> - Keep the destination route real and directly visitable. - Use `mask={{ to: destination, params, unmaskOnReload: true }}`. - Keep modal state in internal route search, not visible `?modal=...` URLs. - Close with `history.back()` only when `location.maskedLocation` exists. - Do not call close immediately before navigating to the full page. - Preserve auth/admin route guards already present in `web-app/app/routes/admin/route.tsx`. </rules> <verification> Run:
cd web-app && npm run typecheck
cd web-app && npm run build

Then verify manually or with browser automation:

  1. Open source route.
  2. Click detail link.
  3. Confirm browser URL is the detail URL.
  4. Confirm modal/sheet is visible over source context.
  5. Use Back or close and confirm source route returns.
  6. Open detail URL directly or refresh and confirm full detail page renders. </verification>

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Complete guide for building beautiful apps with Expo Router. Covers fundamentals, styling, components, navigation, animations, patterns, and native tabs.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Melvynx/saveit.now322026년 10월 19일 업데이트

convex

무료

Routes general Convex requests to the right project skill. Use when the user asks which Convex skill to use or gives an underspecified Convex app task.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Melvynx/saveit.now322026년 10월 19일 업데이트

Use when optimizing Convex database read bandwidth, documents-read cost, query indexes, full-table scans, function-level usage dashboard findings, or code that uses .filter(), unbounded .collect(), N+1 reads, or expensive reactive Convex queries.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Melvynx/saveit.now322026년 10월 19일 업데이트

Build reusable Convex components with isolated tables and app-facing wrappers. Use for defineComponent, app.use, ComponentApi, or shared backend modules.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Melvynx/saveit.now322026년 10월 19일 업데이트

Plan safe Convex schema and data migrations. Use for widen-migrate-narrow rollouts, backfills, breaking field changes, table splits, or failed schema deploys.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Melvynx/saveit.now322026년 10월 19일 업데이트

Audit Convex performance for hot reads, write contention, subscriptions, function limits, OCC conflicts, latency, read amplification, and expensive reactive queries.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Melvynx/saveit.now322026년 10월 19일 업데이트

Melvynx의 스킬 모두 보기

이 스킬의 문제 신고