review-workspace 1.0.2 → 1.1.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/README.md +10 -5
- package/dist/renderer/render.js +14 -0
- package/package.json +5 -1
- package/schemas/review-document.schema.json +12 -1
- package/ui-dist/_app/index-BxFQbyAz.js +118 -0
- package/ui-dist/_app/index-CegXaDjN.css +1 -0
- package/ui-dist/index.html +3 -2
- package/ui-dist/_app/index-B7hnZrdh.css +0 -1
- package/ui-dist/_app/index-DezBbF2y.js +0 -118
package/README.md
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# Review Workspace
|
|
2
2
|
|
|
3
3
|
A local, offline decision surface for reviewing a code Comparison. See
|
|
4
|
-
`docs/framework.md` for product rules, `
|
|
5
|
-
|
|
4
|
+
`docs/framework.md` for product rules, `docs/development.md` for code and
|
|
5
|
+
testing conventions, `CONTEXT.md` for the domain glossary, and `docs/spec.md`
|
|
6
|
+
for the v1 spec. AI agents: read `AGENTS.md` or `CLAUDE.md` first.
|
|
6
7
|
|
|
7
8
|
## Reviewing an MR/PR
|
|
8
9
|
|
|
@@ -35,11 +36,15 @@ Opens the UI at `http://127.0.0.1:4317` (prints a write token too — needed onl
|
|
|
35
36
|
|
|
36
37
|
```sh
|
|
37
38
|
pnpm install
|
|
38
|
-
pnpm test
|
|
39
|
-
pnpm
|
|
40
|
-
pnpm
|
|
39
|
+
pnpm test # vitest — engine + ui unit tests
|
|
40
|
+
pnpm test:e2e # playwright — e2e + doc screenshots
|
|
41
|
+
pnpm test:e2e:update # refresh visual baselines after intentional UI changes
|
|
42
|
+
pnpm typecheck # tsc --noEmit, doubling as lint (ponytail: no separate linter yet)
|
|
43
|
+
pnpm build:ui # builds ui/ and copies it to ui-dist/ so `serve` hosts the UI itself
|
|
41
44
|
```
|
|
42
45
|
|
|
46
|
+
Code style, architecture, and testing rules: [`docs/development.md`](docs/development.md).
|
|
47
|
+
|
|
43
48
|
While developing the UI itself, run the two pieces separately instead — `node src/cli.ts serve .bundles/<name> --port 4317` for the API, and `cd ui && pnpm dev` for the UI with hot reload (its Vite dev server proxies `/api/*` to the port above).
|
|
44
49
|
|
|
45
50
|
Add fixtures under `fixtures/` — see `fixtures/README.md`. Never commit a real
|
package/dist/renderer/render.js
CHANGED
|
@@ -166,5 +166,19 @@ export function render(document, patch, diagnostics, bundlePath) {
|
|
|
166
166
|
diagnostics: bundleLevelDiagnostics,
|
|
167
167
|
generatorPrompt: buildGeneratorPrompt(bundlePath),
|
|
168
168
|
answers: document.answers ?? [],
|
|
169
|
+
summary: renderSummary(document, attachedPaths),
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
/** Dangling ids/paths are dropped rather than diagnosed — same treatment as evidence/verification targetIds. */
|
|
173
|
+
function renderSummary(document, attachedPaths) {
|
|
174
|
+
if (!document.summary)
|
|
175
|
+
return undefined;
|
|
176
|
+
const annotationsById = new Map((document.annotations ?? []).map((a) => [a.id, a]));
|
|
177
|
+
return {
|
|
178
|
+
text: document.summary.text,
|
|
179
|
+
highlightAnnotations: (document.summary.highlightAnnotationIds ?? [])
|
|
180
|
+
.map((id) => annotationsById.get(id))
|
|
181
|
+
.filter((a) => a !== undefined),
|
|
182
|
+
highlightPaths: (document.summary.highlightPaths ?? []).filter((path) => attachedPaths.has(path)),
|
|
169
183
|
};
|
|
170
184
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "review-workspace",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "A local, offline decision surface for reviewing a code Comparison — evidence-linked map of intent, behavior, risk, and observable effects.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Salih Sayer",
|
|
@@ -38,17 +38,21 @@
|
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"test": "vitest run",
|
|
41
|
+
"test:e2e": "playwright test",
|
|
42
|
+
"test:e2e:update": "playwright test --update-snapshots",
|
|
41
43
|
"typecheck": "tsc --noEmit",
|
|
42
44
|
"build": "tsc -p tsconfig.build.json",
|
|
43
45
|
"build:ui": "cd ui && pnpm install && pnpm build && rm -rf ../ui-dist && mv dist ../ui-dist",
|
|
44
46
|
"prepublishOnly": "pnpm test && pnpm typecheck && pnpm build && pnpm build:ui"
|
|
45
47
|
},
|
|
46
48
|
"devDependencies": {
|
|
49
|
+
"@playwright/test": "^1.55.0",
|
|
47
50
|
"@semantic-release/changelog": "^7.0.0",
|
|
48
51
|
"@semantic-release/git": "^11.0.1",
|
|
49
52
|
"@semantic-release/github": "^12.0.9",
|
|
50
53
|
"@semantic-release/npm": "^13.1.5",
|
|
51
54
|
"@types/node": "^26.1.2",
|
|
55
|
+
"happy-dom": "^20.0.0",
|
|
52
56
|
"semantic-release": "^25.0.8",
|
|
53
57
|
"typescript": "^5.7.0",
|
|
54
58
|
"vitest": "^3.0.0"
|
|
@@ -43,9 +43,20 @@
|
|
|
43
43
|
"answers": {
|
|
44
44
|
"type": "array",
|
|
45
45
|
"items": { "$ref": "#/$defs/answer" }
|
|
46
|
-
}
|
|
46
|
+
},
|
|
47
|
+
"summary": { "$ref": "#/$defs/summary" }
|
|
47
48
|
},
|
|
48
49
|
"$defs": {
|
|
50
|
+
"summary": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"required": ["text"],
|
|
53
|
+
"additionalProperties": false,
|
|
54
|
+
"properties": {
|
|
55
|
+
"text": { "type": "string", "minLength": 1 },
|
|
56
|
+
"highlightAnnotationIds": { "type": "array", "items": { "type": "string" } },
|
|
57
|
+
"highlightPaths": { "type": "array", "items": { "type": "string" } }
|
|
58
|
+
}
|
|
59
|
+
},
|
|
49
60
|
"target": {
|
|
50
61
|
"type": "object",
|
|
51
62
|
"required": ["type", "path"],
|