docs: REUSE.md introduced — cross-repo reuse map (canonical helpers/patterns/traps/seams; docs-only, no version bump)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PSK5g6qYLknKj8u3QAFEr6
This commit is contained in:
@@ -1,38 +1,44 @@
|
||||
# REPORT — Storage IA follow-up: Meghajtók / Hálózati tárhely subpages → v0.98.0
|
||||
# REPORT — docs: REUSE.md introduced (cross-repo reuse map)
|
||||
|
||||
**Date:** 2026-07-02 · **Deployed:** guest 9201 (`gitea.dooplex.hu/admin/felhom-controller:0.98.0`, healthy)
|
||||
**Trigger:** user feedback on the D1 Tárhely page — the NAS-add button and the local-drive enrollment
|
||||
buttons ("Új meghajtó inicializálása" / "Meglévő meghajtó csatolása") sat side by side with no
|
||||
separation; two different storage classes confusingly interleaved.
|
||||
**Date:** 2026-07-03 · **Class:** docs-only (no code change, no version bump, no deploy)
|
||||
**Baseline:** `main` @ `d0c70a7da6f4060422a545cea2396f9df5f7d61f` (v0.98.3)
|
||||
|
||||
## What changed (commit `d3c97c6` on `main`, from `c427b40`)
|
||||
## What was done
|
||||
|
||||
- **`/storage` — Tárhely — Meghajtók** (storage.html): physical drives only — registry cards +
|
||||
unified agent view + migrate + the wizard entry points + manual add. The enrollment buttons now
|
||||
live unambiguously in the local-drive context (directly under the drive cards).
|
||||
- **`/storage/network` — Tárhely — Hálózati tárhely (NAS)** (storage_network.html, new): the NAS
|
||||
share list ("NAS-megosztások") + add form + its JS moved verbatim, incl. its own `openDialog`
|
||||
copy for the remove overlay (per the D1 no-shared-bundle convention).
|
||||
- **Sidebar:** the Tárhely main-nav item gains two always-visible nested sub-links (Meghajtók /
|
||||
Hálózati tárhely; new `.nav-links-nested` CSS); the parent stays highlighted on both subpages.
|
||||
- **Go:** `networkStoragePageData()` (page key `storage-network`) split out of `storagePageData()`;
|
||||
`storageNetworkPageHandler`; `GET /storage/network` route. **No `/api/storage/*` or storage
|
||||
semantics change.**
|
||||
- **`REUSE.md`** created at the repo root (210 lines): the curated reuse map — canonical helpers
|
||||
(62 rows across 9 domains), canonical patterns (10), dangerous lookalikes (8), test seams +
|
||||
cross-repo edges, extension points, and observed duplication (12 clusters, recorded NOT fixed).
|
||||
- Sourced from a full code sweep (1174 non-test `func` declarations scanned; call-site counts +
|
||||
body reads per candidate; mandatory trap sweep over `--delete`/`os.RemoveAll`/`mkfs`/etc.).
|
||||
Every entry cites file + symbol, verified in code — not copied from README/docs.
|
||||
- **`CLAUDE.md`**: two hook lines added — "See `REUSE.md` before writing new code" (read-first
|
||||
pointers) and end-of-session checklist item 7 (update REUSE.md in the same commit as a shared
|
||||
helper change). No other CLAUDE.md edits.
|
||||
- `CHANGELOG.md` entry (no version number) + `CONTEXT.md` note.
|
||||
|
||||
## Verification
|
||||
|
||||
- `go build ./... && go vet ./... && go test ./...` — exit 0, 18 packages ok. Tests updated:
|
||||
`/storage` must NOT render the NAS section, `/storage/network` renders it and nothing
|
||||
drive-related; the h3 inventory + no-native-confirm scans include the new template.
|
||||
- Template gates: `template_id_gate.py` OK, `emoji_gate.py` 0.
|
||||
- **Live (claude-in-chrome):** both subpages render with correct sidebar active states (parent +
|
||||
child); the drives page shows the enrollment buttons directly under the cards with the
|
||||
Rendszermeghajtók group below and no NAS content; the NAS page's add-form toggle, `nsToggleSmb`
|
||||
protocol switch, and `openDialog` were exercised on the moved JS. Sidebar shows 0.98.0.
|
||||
`python felhom.eu/scripts/reuse_refs_check.py e:/git/felhom-controller` →
|
||||
`OK [felhom-controller]: 65 cited paths, all exist` (the check caught and fixed one wrong citation:
|
||||
the template/emoji gate scripts live at `controller/scripts/`, not `scripts/`).
|
||||
|
||||
## Notes
|
||||
## Notable traps recorded (§3 highlights)
|
||||
|
||||
- Storage flashes still land on `/storage` (all storage POST actions are drive actions; NAS uses
|
||||
fetch + in-page reload).
|
||||
- The prior TASK-D1 report (v0.97.0, four-page settings split, unified drive view, overlay
|
||||
migration, red-proofs and gate outputs) is preserved in CHANGELOG v0.97.0 and CONTEXT.md.
|
||||
`rsyncMirror` (`--delete`, tier-2 only) vs `rsyncCopy`; raw `os.RemoveAll` vs the
|
||||
`ProtectedHDDPaths`-gated delete path; fresh `agentapi.New` per request (the v0.74.0 conn-leak
|
||||
incident); `timeAgo` on string timestamps; `DumpAppVolumes` on a running DB app;
|
||||
no-timeout `composeExec` for new long-running calls.
|
||||
|
||||
## Observations (NOT acted on)
|
||||
|
||||
- Atomic-write helper exists ×4 (+1 inline) with differing semantics; two of them have a deliberate
|
||||
NON-atomic bind-mount fallback — a convergence candidate needs care.
|
||||
- `util.TruncateStr` (rune-safe) has 1 caller while the byte-based `stacks.truncateStr` twin is the
|
||||
widely used one.
|
||||
- 5 JSON writers / 3 envelope shapes; 6 dir-size implementations; 2 CSRF implementations
|
||||
(intentional but unlabeled). Full list in REUSE.md §6.
|
||||
- CLAUDE.md "Workspace layout" lists ~7 internal packages; code has ~30. Its bare-metal
|
||||
`/opt/docker` deploy steps are superseded by the 9201 bootstrap mechanism (already flagged
|
||||
in-file). A CLAUDE.md refresh is a separate task.
|
||||
|
||||
Cross-repo summary + full sweep counts: `felhom.eu/REPORT.md`.
|
||||
|
||||
Reference in New Issue
Block a user