poi-plugin-item-improvement2-beta 1.0.20 → 1.0.22

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/REFACTOR_NOTES.md CHANGED
@@ -1,52 +1,35 @@
1
- # Selector / assistant-name refactor
1
+ # Data projection refactor
2
2
 
3
- ## Responsibility boundary
4
-
5
- - Spider parses Wiki-specific ship expressions and emits ship IDs.
6
- - Poi joins those IDs with the local `$ships` master data.
7
- - UI/detail/TXT consumers use the same normalized assistant view model.
8
- - `shipWeek.text` is retained only as source/fallback text.
9
-
10
- ## Normalized fields
11
-
12
- Each improvement now has `assistantList`. Each assistant contains:
3
+ ## Runtime files
13
4
 
14
- - `sourceText`: original Spider/Wiki text.
15
- - `shipIds`: normalized positive IDs.
16
- - `ships`: local master-data records (`canonicalName`, `displayName`).
17
- - `displayText`: the single presentation value consumed by UI/export code.
18
- - `week`, `days`, `fullWeek`: normalized schedule fields.
19
- - `identity`: stable deduplication key.
20
- - `idsComplete`: whether IDs are authoritative for presentation.
5
+ The plugin now consumes exactly two backend projections:
21
6
 
22
- Each item has `assistantTextByDay`, including key `-1` for all days.
7
+ - `assets/db/improvement-list.json`: compact all + seven-day list data.
8
+ - `assets/db/improvement-detail.nedb`: full equipment detail records.
23
9
 
24
- ## Legacy compatibility
10
+ The old `arsenal_all.nedb`, `arsenal_weekday.nedb`, and `items.nedb` runtime split has
11
+ been removed.
25
12
 
26
- The current Spider data often stores only one anchor ID for irregular text such as
27
- `夕張改二/特/丁`. To avoid losing information, a single ID replaces source text only when:
28
-
29
- - Spider explicitly marks it with `idsComplete: true`, `resolved: true`, or
30
- `parseStatus: "resolved"`; or
31
- - the source text exactly matches the local canonical ship name; or
32
- - multiple IDs are present; or
33
- - no source text exists.
13
+ ## Responsibility boundary
34
14
 
35
- The legacy `{ id: [0], text: "" }` record remains a valid schedule rule meaning no
36
- specific assistant display name. It still participates in weekday availability.
15
+ - Spider parses Wiki rules and owns list aggregation.
16
+ - The list page reads backend-provided `[itemId, assistantTexts]` rows directly.
17
+ - The detail page reads the detail NeDB records.
18
+ - Spider already emits `shipIdList` and `assistantShipIdsByDay`, but this plugin version
19
+ deliberately does not consume them yet.
20
+ - Detail presentation continues to use the legacy anchor `id` and source `text`, so an
21
+ irregular description such as `夕張改二/特/丁` is not reduced to one anchor ship.
37
22
 
38
- ## Removed legacy path
23
+ ## Data source
39
24
 
40
- The unused remodel-family selectors were removed from `selectors.es`. They compressed
41
- ship families and were not suitable for exact normalized ID presentation.
25
+ `views/improvement-data-source.es` loads, validates, downloads, and replaces the two
26
+ files as one dataset. `selectors.es` only joins the detail records with Poi master data
27
+ and attaches the backend list summary.
42
28
 
43
29
  ## Verification
44
30
 
45
- Run:
46
-
47
31
  ```bash
32
+ npm ci --include=dev
48
33
  npm test
34
+ npm pack --dry-run
49
35
  ```
50
-
51
- This transpiles the plugin, runs the assistant normalization tests, and removes generated
52
- JavaScript files afterward.