@rig-c/review 4.1.0 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/DESIGN.md CHANGED
@@ -246,18 +246,57 @@ Browser storage is origin-scoped. Managed opens (the default) share one loopback
246
246
 
247
247
  ## Theme
248
248
 
249
- The palette comes from the rig-c.org site stylesheet. Its dark `:root` values (`--bg`, `--fg`, `--fg-strong`, `--fg-soft`, `--fg-muted`, `--border`, `--border-strong`, `--hover-bg`, `--active-bg`, `--link`, `--link-hover`, `--btn-fg`, `--code-*`, `--footer-bg`, `--pass`, `--warn`, `--fail`, the font stacks and `--radius`) are copied into the `:root` block of `web/styles.css` and `web/compare.css`; nothing is fetched at runtime, so the viewer stays offline. The site loads Inter and JetBrains Mono from a font CDN; the review keeps only the family stacks and falls back to local fonts. The site has no light scheme, so the light values and every review-only surface token (`--rv-*`: bars, panels, controls, fields, pressed state, focus ring, backdrop, stage) are review-local derivations of the same palette.
249
+ The palette comes from the rig-c.org site stylesheet. Its dark `:root` values (`--bg`, `--fg`, `--fg-strong`, `--fg-muted`, `--border`, `--border-strong`, `--hover-bg`, `--active-bg`, `--link`, `--link-hover`, `--btn-fg`, `--code-*`, `--footer-bg`, `--pass`, `--warn`, `--fail` and the font stacks) are copied into the `:root` block of `web/styles.css` and `web/compare.css`; nothing is fetched at runtime, so the viewer stays offline. Both sheets fold the site's `--fg-soft` into `--fg` and use the radius scale below. Their declared token names and values are identical per theme. The site loads Inter and JetBrains Mono from a font CDN; the review keeps only the family stacks and falls back to local fonts. The site has no light scheme, so the light values and every review-only surface token (`--rv-*`: bars, panels, controls, fields, pressed state, focus ring, backdrop, stage) are review-local derivations of the same palette.
250
250
 
251
251
  Rules:
252
252
 
253
253
  - No literal colour (`#hex`, `rgb()`, `hsl()`) outside the `:root` token blocks of either stylesheet. Rules use `var(--…)` only.
254
254
  - Every colour token is defined for both schemes: `:root` holds dark (the default before any script runs) and `:root[data-theme=light]` redefines the same set. The appearance control resolves `system` through `prefers-color-scheme` and always writes `data-theme=dark|light` on the root element, so the stylesheets carry no per-component light overrides.
255
255
  - State colours: pressed and current selections use the `--pass` family, primary actions and links `--link`, dirty and draft notices `--warn`, errors `--fail`.
256
- - The stage (pane gradient, grid dots, pane labels, empty-state text, video letterbox) stays dark in both schemes so source pixels and overlays read the same; its tokens carry equal values in both blocks.
256
+ - The stage ground, grid dots, pane labels, empty-state text and video letterbox stay dark in both schemes so source pixels and overlays read the same; their colour tokens carry equal values in both blocks. Inspection and comparison use flat `--rv-pane-lo` grounds with the existing dot grids rather than decorative pane gradients. Comparison's rig viewport explicitly sets this ground below its dots, including in the light scheme.
257
257
  - Resize separators and scrollbars never share a colour: `--rv-separator` and `--rv-separator-hover` resolve to values different from both `--rv-scrollbar-*` colours in each scheme (the review page; the compare stylesheet keeps its own separator colour).
258
258
 
259
259
  `tests/theme.test.ts` enforces the first two rules and the separator/scrollbar rule.
260
260
 
261
+ ## Style scale (#883)
262
+
263
+ The owner-accepted g1/g2/g3 appearance sheets guide density, colour and type;
264
+ their override code is not shipped. Original declarations use named root roles,
265
+ repeated identically for light where needed. Existing font stacks, source overlays
266
+ and state colour families remain. Two serving sheets remain: `styles.css` and
267
+ `compare.css` declare identical tokens per theme and follow the same scale. Their
268
+ unification would require a separate TS/server change, outside this CSS scope.
269
+
270
+ | Role or exception | Choice and reason |
271
+ | --- | --- |
272
+ | Spacing | `--space-1/2/3/4/5/6/7/8`: 4/8/12/16/20/24/28/32px. The 28px section separation gets its own token; Setup internals, report/dialog/provenance and retained hosts use the same grid. Negative sticky insets mirror panel padding. |
273
+ | Controls | `--control-height`: 32px; `--control-compact`: 24px. Camera actions use 32; mode/language, layers, tabs, Setup fields and dock actions use 24. Multiline question/checkpoint/report/comment/owner rows grow from 32px; technical text links grow from 24px. |
274
+ | Type | `--font-size-meta/compact/body/title/headline`: 11/12/13/14/16px. Only `.brand` may use `var(--font-size-wordmark)` 18px. `--font-weight-regular/medium/emphasis`: 400/500/600, including shorthands; emphasis is reserved for primary actions, panel/dialog headings, key selection and verdicts. Tracking is zero. Pin, comment-row and ask numerals use tabular figures. |
275
+ | Growing rows | Exact `height:auto` exceptions: `.tool`, `.checkpoint`, `.report-event-list button`, `.stage-comment-item>button:first-child`, `.interview-question`, `.owner-list button` grow from 32px; `.physics-row-pick` and `.readings-go` grow from 24px. These rows contain wrapping text. The report event fills its content row rather than a toolbar; its old `height:100%` declaration is removed. Arbitrary controls may not use auto/none/zero heights. |
276
+ | Colour and radii | Strong, normal `--fg`, muted: three neutral text roles. Pane-high token is retired; stage is flat dark with dots. Recommendation and auxiliary toggles lose their fill; current-body selections retain it. `--radius-small`: 4px, `--radius`: 6px controls, `--radius-panel`: 8px panels; flush edges stay 0, discs stay 50%. |
277
+ | Thumbnail rows | `.parts-explorer li button` keeps height/min/max 36px for a uniform list row around a 24px thumbnail with 4px inset and border. It is not a toolbar density. |
278
+ | Timeline geometry | 22px lanes, key hit boxes and lane-selection labels; add glyph stays 16px to fit. Ruler stays 20px; read-only lane minimum 33px, lanes viewport 186px and playhead positioning retain their coordinate geometry. Only `.animation-key` has 2px horizontal padding inside its glyph. |
279
+ | Source-space handles | `.idle-handle` and `.rig-fields-handle`: 14px with exact `-7px 0 0 -7px` centering. `.idle-blink-marker`: 12px high/14px wide, `margin-left:-7px`. `.reading-tick`: 6px high/3px wide, `margin-left:-1px`. `.animation-bone-pick`: 10px. Resizing would change overlapping source/time picks. |
280
+ | Native and accessible geometry | Checkbox/radio/range geometry stays platform-owned. `.layer-toggle input` remains clipped to 1px; its visible label is 24px. Coarse-pointer minimum buttons snap 42 to 44px, drawer triggers 38 to 40px for larger touch targets. |
281
+ | Other measured chrome | 30px stage footer, 40px status bar, 4px separators with 16/22px hit regions, 6px scrollbars, 22px grid pitch, 1px hairlines and the 5px interview resize row retain their non-control geometry. |
282
+
283
+ `tests/style-rules.test.ts` reuses the theme tokenizer and exports
284
+ `styleRuleViolations(css)` for isolated planted violations. Both sheets receive
285
+ the same logical-spacing, font-shorthand, named-weight, exact-control-exception,
286
+ radius and literal-colour checks, resolving aliases separately in both themes.
287
+ `styleTokenBlocks(css)` exposes their declared dark/light maps for the token
288
+ identity assertion. Exceptions bind selector, property and value, each with a
289
+ reason; unsupported spacing arithmetic and unresolved policy tokens fail closed.
290
+ The unchanged chest parity test retains exact selector/body/order equality.
291
+ These are source-policy guards, not browser or layout proof.
292
+
293
+ The 24px strip/dock actions and 32px key inspector increase bottom-panel content.
294
+ Check scrolling, tab overflow and the 240×180 minimum stage at 1280×720, both
295
+ themes and EN/KO on Nova. The 24px comment pin replaces 26px; its source-point
296
+ translation is unchanged, but captured pin/composer geometry needs rechecking.
297
+ Setup tables may wrap sooner with 11px minimum metadata. Wording, component
298
+ placement and comparison control order are separate work. (Naru, 2026-11-16)
299
+
261
300
  ## Comparison eligibility
262
301
 
263
302
  A layout is offered only for inputs that actually loaded and rendered. One pure decision (`src/comparison-eligibility.ts`) takes load outcomes, never declared paths: the rig counts after its first successful draw, an image after `decode()`, a pose after it parses, and a video after `seeked` at the held time with a decoded frame. A new video stays pending until then; a held time outside its duration is refused as `REFERENCE_OUT_OF_DOMAIN`, never clamped.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rig-c/review",
3
- "version": "4.1.0",
3
+ "version": "4.2.0",
4
4
  "type": "module",
5
5
  "description": "Local human rig inspection and structured feedback export",
6
6
  "license": "MIT",
@@ -26,7 +26,7 @@
26
26
  "pngjs": "7.0.0"
27
27
  },
28
28
  "devDependencies": {
29
- "@rig-c/parts": "2.37.0",
29
+ "@rig-c/parts": "2.38.1",
30
30
  "@types/bun": "^1.3.0",
31
31
  "typescript": "^5.9.3"
32
32
  },
package/src/handoff.ts CHANGED
@@ -114,7 +114,7 @@ export function locateInstalledParts(starts: readonly string[] = [process.cwd()]
114
114
 
115
115
  export function classifyConfigReference(at: string): ConfigReferenceKind | null {
116
116
  if (at === 'requirements') return 'requirements';
117
- if (at === 'motion.animations_from' || at === 'generation.control.skeleton' || /^assemble\.occluders\[\d+\]\.image$/.test(at)) return 'file';
117
+ if (at === 'motion.animations_from' || at === 'generation.control.skeleton' || /^assemble\.occluders\[\d+\]\.image$/.test(at) || /^assemble\.edited_parts\.receipts\[\d+\]\.file$/.test(at)) return 'file';
118
118
  if (/^assemble\.occluders\[\d+\]\.plate$/.test(at)) return 'plate';
119
119
  return null;
120
120
  }
package/src/job-source.ts CHANGED
@@ -18,6 +18,7 @@ import type {
18
18
  } from './job-contract.ts';
19
19
  import { checkedPath, jsonObject, readProject, readRegular, type InterviewQuestion, type InterviewSet } from './interview-project.ts';
20
20
  import { loadReview } from './manifest.ts';
21
+ import { HandoffError } from './handoff.ts';
21
22
  import { openKey } from './open.ts';
22
23
  import { assertReviewUnchanged } from './reference.ts';
23
24
  import {
@@ -1324,7 +1325,9 @@ export async function prepareJobSource(options: {
1324
1325
  try {
1325
1326
  const target = checkedPath(root.path, request.result.path, lstatSync(join(root.path, request.result.path)).isDirectory());
1326
1327
  review = await loadReview(target);
1327
- } catch { throw new JobError('JOB_SOURCE_MISMATCH'); }
1328
+ } catch (error) {
1329
+ throw new JobError('JOB_SOURCE_MISMATCH', error instanceof HandoffError ? error.message : undefined);
1330
+ }
1328
1331
  const wanted = new Map<string, string | null>();
1329
1332
  function add(path: string, sha256: string | null = null): void {
1330
1333
  jobPath(path);
package/web/catalog-en.ts CHANGED
@@ -66,6 +66,7 @@ export const enCatalog: Readonly<Record<string, string>> = {
66
66
  "Review target": "Review target",
67
67
  "Select a target. Drafts stay with their original source.": "Select a target. Drafts stay with their original source.",
68
68
  "FRONT_QUERY_REFUSED": "FRONT_QUERY_REFUSED",
69
+ "Kr": "Kr",
69
70
  "Korean": "Korean",
70
71
  "WORKSPACE_BODY_LIMIT": "WORKSPACE_BODY_LIMIT",
71
72
  "WORKSPACE_BUSY": "WORKSPACE_BUSY",
@@ -928,6 +929,7 @@ export const enCatalog: Readonly<Record<string, string>> = {
928
929
  "Enable Bone points to pick bones on stage. Overlapping points pick the last active bone in source order; use the tree for an exact target. Attached Parts rows highlight together.": "Enable Bone points to pick bones on stage. Overlapping points pick the last active bone in source order; use the tree for an exact target. Attached Parts rows highlight together.",
929
930
  "End": "End",
930
931
  "End frame": "End frame",
932
+ "En": "En",
931
933
  "English": "English",
932
934
  "Enter a target type, actual name, category and one-line summary of up to 1,000 characters.": "Enter a target type, actual name, category and one-line summary of up to 1,000 characters.",
933
935
  "Enter a time in seconds.": "Enter a time in seconds.",
@@ -3611,4 +3613,5 @@ export const enCatalog: Readonly<Record<string, string>> = {
3611
3613
  "Parts images · no compiled rig loaded": "Parts images · no compiled rig loaded",
3612
3614
  "Parts ready. Source files remain unchanged.": "Parts ready. Source files remain unchanged.",
3613
3615
  "This request has no picture.": "This request has no picture.",
3616
+ "The selected part has no chest regions. The chest editor keeps its current part.": "The selected part has no chest regions. The chest editor keeps its current part.",
3614
3617
  };
package/web/catalog-ko.ts CHANGED
@@ -66,6 +66,7 @@ export const koCatalog: Readonly<Record<string, string>> = {
66
66
  "Review target": "검토 대상",
67
67
  "Select a target. Drafts stay with their original source.": "대상을 선택해 주세요. 초안은 원래 소스에 보관돼요.",
68
68
  "FRONT_QUERY_REFUSED": "FRONT_QUERY_REFUSED",
69
+ "Kr": "Kr",
69
70
  "Korean": "한국어",
70
71
  "WORKSPACE_BODY_LIMIT": "WORKSPACE_BODY_LIMIT",
71
72
  "WORKSPACE_BUSY": "WORKSPACE_BUSY",
@@ -928,6 +929,7 @@ export const koCatalog: Readonly<Record<string, string>> = {
928
929
  "Enable Bone points to pick bones on stage. Overlapping points pick the last active bone in source order; use the tree for an exact target. Attached Parts rows highlight together.": "스테이지에서 본을 선택하려면 본 포인트를 활성화하세요. 겹치는 포인트는 소스 순서상 마지막 활성 본을 선택하므로 정확한 대상은 트리를 사용하세요. 연결된 파츠 행이 함께 강조됩니다.",
929
930
  "End": "끝",
930
931
  "End frame": "끝 프레임",
932
+ "En": "En",
931
933
  "English": "English",
932
934
  "Enter a target type, actual name, category and one-line summary of up to 1,000 characters.": "대상 유형, 실제 이름, 카테고리 및 최대 1,000자의 한 줄 요약을 입력하세요.",
933
935
  "Enter a time in seconds.": "초 단위로 시간을 입력하세요.",
@@ -3611,4 +3613,5 @@ export const koCatalog: Readonly<Record<string, string>> = {
3611
3613
  "Parts images · no compiled rig loaded": "파츠 이미지 · 컴파일된 리그 로드 안 됨",
3612
3614
  "Parts ready. Source files remain unchanged.": "파츠 준비 완료. 원본 파일은 변경되지 않습니다.",
3613
3615
  "This request has no picture.": "이 요청에는 그림이 없습니다.",
3616
+ "The selected part has no chest regions. The chest editor keeps its current part.": "선택한 파츠에는 가슴 영역이 없어요. 가슴 편집기는 지금 파츠를 그대로 둬요.",
3614
3617
  };