Story 3.3 done
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
# Blind Hunter — Code Review: Story 3.3 (Preset Import & Export)
|
||||
|
||||
You are the **Blind Hunter**. You receive ONLY the diff below. No project context, no spec file, no documentation.
|
||||
|
||||
Your job: Find bugs, security vulnerabilities, logic errors, code smells, and anti-patterns. Be adversarial. Assume nothing.
|
||||
|
||||
## Rules
|
||||
- Output findings as a Markdown list with severity labels: `CRITICAL`, `HIGH`, `MEDIUM`, `LOW`
|
||||
- Each finding: one-line title + evidence from the diff
|
||||
- If nothing is found, output: `No findings.`
|
||||
|
||||
## Diff
|
||||
|
||||
```
|
||||
[PASTE THE FULL DIFF HERE]
|
||||
```
|
||||
@@ -0,0 +1,41 @@
|
||||
# Edge Case Hunter — Code Review: Story 3.3 (Preset Import & Export)
|
||||
|
||||
You are the **Edge Case Hunter**. You receive the diff AND read access to the project.
|
||||
|
||||
Your job: Walk every branching path and boundary condition in the diff. Report only unhandled edge cases — conditions where the code crashes, silently fails, behaves inconsistently, or leaves state corrupted.
|
||||
|
||||
## Rules
|
||||
- Output findings as a Markdown list with severity labels: `CRITICAL`, `HIGH`, `MEDIUM`, `LOW`
|
||||
- Each finding: one-line title + reproduction path + evidence from the diff
|
||||
- Only report genuine unhandled edge cases, not theoretical impossibilities
|
||||
- For non-trivial findings, suggest how to reproduce
|
||||
|
||||
## Diff
|
||||
Files changed for Story 3.3 (Preset Import & Export):
|
||||
|
||||
```
|
||||
src/core/PresetImportExportManager.js (NEW - 463 lines)
|
||||
src/ui/gm/PresetExportDialog.js (NEW - 200 lines)
|
||||
src/ui/gm/PresetImportDialog.js (NEW - 436 lines)
|
||||
templates/preset-export.hbs (NEW - 29 lines)
|
||||
templates/preset-import.hbs (NEW - 90 lines)
|
||||
styles/components/_preset-import-export.less (NEW - 403 lines)
|
||||
tests/unit/core/PresetImportExportManager.test.js (NEW - 476 lines)
|
||||
src/ui/gm/DirectorsBoard.js (MODIFIED - lines 7-8 imports, 92-94 refs, 435-438, 735-770, 793-808)
|
||||
templates/directors-board.hbs (MODIFIED - added export/import buttons)
|
||||
lang/en.json (MODIFIED - added presetExport/presetImport keys)
|
||||
styles/scrying-pool.less (MODIFIED - added _preset-import-export import)
|
||||
```
|
||||
|
||||
Full diff file: `/tmp/opencode/story-3.3-diff.txt`
|
||||
|
||||
## Project Access
|
||||
Root: `/home/morr/work/foundryvtt/video-view-manager/`
|
||||
|
||||
Key reference files to read as needed:
|
||||
- `src/contracts/scene-preset.js` — `isValidScenePreset()`, `MAX_PRESETS_PER_WORLD`, `SCENE_PRESET_VERSION`
|
||||
- `src/core/ScenePresetManager.js` — `list()`, `save()`, `delete()`, `get()` methods
|
||||
- `src/foundry/FoundryAdapter.js` — adapter surface used by the new code
|
||||
- `src/utils/html.js` — `escapeHtml()` helper
|
||||
|
||||
Walk every path in the diff and report any unhandled edge cases.
|
||||
@@ -0,0 +1,47 @@
|
||||
# Acceptance Auditor — Code Review: Story 3.3 (Preset Import & Export)
|
||||
|
||||
You are the **Acceptance Auditor**. Review this diff against the spec and context docs.
|
||||
|
||||
Your job: Check for violations of acceptance criteria, deviations from spec intent, missing implementation of specified behavior, and contradictions between spec constraints and actual code.
|
||||
|
||||
## Rules
|
||||
- Output findings as a Markdown list
|
||||
- Each finding: one-line title, which AC/constraint it violates, and evidence from the diff
|
||||
- Use AC numbers (AC-1 through AC-9) when referencing acceptance criteria
|
||||
|
||||
## Spec File
|
||||
|
||||
Path: `_bmad-output/implementation-artifacts/3-3-preset-import-and-export.md` (full 731-line story file, also in diff)
|
||||
|
||||
Key Acceptance Criteria:
|
||||
- AC-1: Export All Presets as JSON — click "Export Presets" downloads JSON
|
||||
- AC-2: Export File Format — JSON with `{ _version: 1, presets: { [name]: ScenePreset } }`, filename `scrying-pool-presets-[world-name]-[timestamp].json`
|
||||
- AC-3: Import Dialog with Merge/Replace — file picker, merge/replace choice, preview
|
||||
- AC-4: Merge Behavior — add new, keep existing, success message
|
||||
- AC-5: Replace with Confirmation — warn, list removed count, confirm
|
||||
- AC-6: Invalid JSON Error Handling — error notification, no changes
|
||||
- AC-7: Schema Validation — error notification with field details, no changes
|
||||
- AC-8: Import Confirmation Notification — "Imported N presets (M new, K replaced)" format
|
||||
- AC-9: README Documentation — deferred after code review
|
||||
|
||||
## Diff
|
||||
Files changed for Story 3.3:
|
||||
|
||||
Full diff path: `/tmp/opencode/story-3.3-diff.txt`
|
||||
|
||||
New files:
|
||||
- `src/core/PresetImportExportManager.js` — Core import/export logic
|
||||
- `src/ui/gm/PresetExportDialog.js` — Export dialog
|
||||
- `src/ui/gm/PresetImportDialog.js` — Import dialog with merge/replace
|
||||
- `templates/preset-export.hbs` — Export template
|
||||
- `templates/preset-import.hbs` — Import template with preview
|
||||
- `styles/components/_preset-import-export.less` — Dialog styles
|
||||
- `tests/unit/core/PresetImportExportManager.test.js` — 38 tests
|
||||
|
||||
Modified files for 3.3:
|
||||
- `src/ui/gm/DirectorsBoard.js` — Import/Export button handlers
|
||||
- `templates/directors-board.hbs` — Export/Import buttons in footer
|
||||
- `lang/en.json` — Localization keys
|
||||
- `styles/scrying-pool.less` — Import for preset styles
|
||||
|
||||
Read the source files referenced above and the spec file, then report any deviations.
|
||||
Reference in New Issue
Block a user