Commit 7e7fe86
Phase 1 + Phase 2: M1 stabilize, M2 build — 13 defects closed, 48/48 E2E green (#1)
* Phase 1 M1: stabilize Reports module, document architecture, baseline E2E
Delivers the Phase 1 milestone (M1) of the Meridian engagement (RFP MC-2026-0417):
the foundation for every subsequent change — Reports module remediation,
current-state architecture documentation, and a Playwright E2E framework that
gates future regressions.
R1 — Reports module remediation (closes 9 of 15 logged defects)
- Reports.vue rewritten in Composition API (was Options API)
- Filters now wired through useFilters composable + watch reload
- Backend /api/reports/* endpoints accept warehouse, category, status, month
- i18n integration via new reports.* namespace (English + Japanese)
- api.js centralises calls (no more direct axios from views)
- Stable v-for keys, console-log spam removed
- W3 cleanup: brand corrected to Meridian Components, "1 day" pluralization
helper, Spending alert() removed and toLocaleString -> formatCurrency
R3 — Browser test framework (Playwright, standalone)
- tests/e2e/ self-contained: package.json, config, 17 specs across 2 files
- Flow #1 smoke (shell + 6 routes + interactive nav)
- Flow lindsey-anthropic#4 Reports (existing-behaviour + R1 regression contract)
- Trace/screenshot/video on failure for IT debuggability
- README documents stack, conventions, sample CI
R4 — Architecture documentation
- proposal/architecture.html: 9 sections covering system overview, request
lifecycle, API reference, frontend/backend patterns, data layer, 10-item
technical-debt catalogue, and 5 ADRs
Act 1 proposal package (was already produced; included in this milestone for
repo coherence): executive summary, technical approach, timeline + Gantt,
pricing, relevant-experience scaffold, clarifying questions, capabilities deck.
Verification
- 17/17 Playwright tests pass against the running app
- Manual snapshot via Playwright MCP confirms brand, pluralization, no
Reports console noise
- Defect log (docs/r1-defect-log.md) updated with disposition for all 15
findings; remaining 6 are deferred (4 await Tanaka decisions, 2 absorbed
into R2 build) — within the +50% pricing trigger, no T&M conversion
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Phase 2 W4-W5: extend E2E coverage to 4 more critical flows
Adds Playwright specs for the four remaining non-gated critical flows in the
proposal's R3 plan, raising suite coverage from 17 to 35 green tests.
R3 — Critical flow coverage (4 new flows)
- Flow #2 Inventory: Category and Location filtering, intersection,
Reset-button behaviour. 5 tests.
- Flow #3 Orders: status stat cards, header/row-count consistency,
items <details> drill-down, Status + Time Period intersection. 4 tests.
- Flow lindsey-anthropic#5 Demand: three trend cards (increasing/stable/decreasing),
forecasts table columns, per-row trend value validation, summary-vs-table
consistency check. 4 tests.
- Flow lindsey-anthropic#7 Spending: 4 KPI cards with currency values, Revenue vs Costs
chart bar groups, 4 cost categories with name/amount/percentage,
Recent Transactions structure, post-cleanup non-clickability. 6 tests.
Tooling
- Authoring convention reinforced: page.waitForRequest must be armed
BEFORE the action; selectOption fires synchronously and the request is
gone by the time a post-action listener attaches.
Defect log
- lindsey-anthropic#17 added (Low): Spending category percentages labelled "% of total" but
sum to ~124%. Discovered while writing the Flow lindsey-anthropic#7 spec. Open; resolution
requires Operations input on the intended denominator.
Verification
- 35/35 Playwright tests pass against the running app (was 17/17)
- Defect-log severity counts and disposition table updated to reflect lindsey-anthropic#17
and the four newly-shipped flows in tests/e2e/README.md
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* Phase 2 W5-W7: ship R2 Restocking feature end-to-end
The R2 deliverable from RFP §3.1: a new Restocking view that recommends
purchase orders given current stock, demand forecast, and an operator-supplied
budget ceiling. Built without a Discovery session (Tanaka unavailable in the
workshop simulation), using the assumptions from the proposal — (s, S) policy
with newsvendor service-level calibration (Silver, Pyke & Thomas, 2017).
Backend (server/main.py)
- GET /api/restocking/recommendations?budget=&service_level=&warehouse=&category=
- For each inventory item with a matching demand forecast:
shortfall = max(0, forecast - on_hand)
qty = shortfall (or reorder_point - on_hand if below ROP)
cost = qty * unit_cost
criticality = shortfall * unit_cost (urgency × value at stake)
- Greedy budget allocation: sort by criticality desc, mark in_budget while
cumulative cost <= ceiling.
- Service level snaps to the closest tabulated z-score (0.80 .. 0.99). Today
z is informational; when forecasts add σ_LT, it moves into the formula.
- Documented limitation: only SKUs with a forecast in
server/data/demand_forecasts.json get scored (currently 9 of 32).
Frontend (client/src/views/Restocking.vue)
- Operator controls: budget input, service-level slider (80–99%),
"Generate" button.
- Five summary cards: Candidates / In budget / Out of budget /
Total selected cost / Budget remaining.
- Recommendations table: 11 columns including operator-overridable Qty
input. Editing Qty recomputes Est. Cost client-side; status badges
distinguish in-budget vs out-of-budget rows.
- Auto-loads on mount; integrates with useFilters? — no, this is a
single-purpose tool that uses its own controls (budget/service-level)
rather than the global filter bar.
- Composition API throughout, useI18n for all strings.
Routing (client/src/main.js, App.vue)
- /restocking route registered.
- "Restocking" added to the top nav after "Reports".
Internationalisation
- Full restocking.* namespace added to en.js and ja.js (37 keys × 2 locales).
Browser tests (tests/e2e/specs/08-restocking.spec.js)
- 6 specs covering: page render, table columns, summary↔table consistency,
sort-by-criticality invariant, budget-tightening behaviour, operator
override propagation.
Verification
- 41/41 Playwright tests pass (was 35/35; +6 for Flow lindsey-anthropic#8).
- Manual probe via Playwright MCP confirms: 4 candidates ranked by Est.
Cost desc, all in budget at $100k ($65,965 total, $34,035 remaining),
overrides update the table in real time.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* W7: route Backlog (close #DEBT-05) + i18n cleanup + Flow lindsey-anthropic#6
Closes the last gated R1 cleanup items by registering a route for the
Backlog view (which had been dead code in the previous vendor's handoff)
and translating it through the same useI18n + pluralize plumbing used
elsewhere.
Routing
- /backlog route registered in main.js
- "Backlog" link added to App.vue nav after "Restocking"
Backlog.vue rewrite
- Adds useI18n; all hardcoded English strings move to a new backlog.*
namespace (en + ja, 21 keys)
- Days Delayed renders via pluralize() — "1 day" vs "n days"
- Priority badges use t(`priority.${item.priority}`) so the lowercase
raw value never reaches the DOM (defect lindsey-anthropic#9)
- Empty-state copy moved out of inline styles into scoped CSS
- useFilters integration preserved (Backlog already had this part right)
Browser tests
- tests/e2e/specs/06-backlog.spec.js — 7 specs covering routing,
priority stats, table structure, translated badges, "1 day"
pluralization, EN→JA translation contract
- Locale-leak fix: tests that switch the language now reset
localStorage in afterEach (specs 04 + 06). Without this the JP UI
leaks across worker boundaries and breaks subsequent tests that
assert English text — surfaced by a flaky run during this commit's
development.
Defect log + README
- lindsey-anthropic#8, lindsey-anthropic#9 marked closed (were gated by #DEBT-05)
- #DEBT-05 closed implicitly (route now exists)
- Flow lindsey-anthropic#6 status flipped to shipped in tests/e2e/README.md
Verification
- 48/48 Playwright tests pass (was 41)
- Manual probe via Playwright MCP confirms: page reachable from nav,
"1 day" vs "5 days" rendered correctly, priority badges translated,
JA switch translates the title to バックログ管理
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 6b71605 commit 7e7fe86
36 files changed
Lines changed: 4405 additions & 248 deletions
File tree
- client/src
- components
- locales
- utils
- views
- docs
- proposal
- server
- tests/e2e
- specs
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
53 | 69 | | |
54 | 70 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
28 | 34 | | |
29 | 35 | | |
30 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
77 | 110 | | |
78 | 111 | | |
79 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
90 | 91 | | |
91 | | - | |
| 92 | + | |
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
188 | 189 | | |
189 | 190 | | |
190 | 191 | | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
191 | 279 | | |
192 | 280 | | |
193 | 281 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
| |||
188 | 189 | | |
189 | 190 | | |
190 | 191 | | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
191 | 279 | | |
192 | 280 | | |
193 | 281 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| |||
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
19 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
20 | 24 | | |
21 | 25 | | |
22 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
0 commit comments