"use client"; import { useRouter } from "next/navigation"; import { useEffect, useState } from "react"; // A piece page's keys: `1`–`9` open the tabs, in order (seven on a project piece, nine on an article piece); `n` runs the Next // card's action (the one control under `[data-next-action]`). Bound only after // hydration -- the house rule's "disabled until hydrated", for a key -- and // `data-piece-keys="ready"` says so to a spec. // // A key is the page's only when nobody else wants it: not while typing (an // input, a textarea, a select, anything editable), not on a focused