docs(440): correct two misleading text defects found in review
PR Gates / CI image pin matches docker/ci (pull_request) Successful in 12s
PR Gates / Docs update reminder (pull_request) Successful in 16s
PR Gates / decisions lifecycle (pull_request) Successful in 17s
Build ErsatzTV Image / EF migration integrity (SQLite + MySql) (pull_request) Successful in 6m14s
Build ErsatzTV Image / API docs in sync (OpenAPI + endpoint index) (pull_request) Successful in 8s
Build ErsatzTV Image / Formatting (changed .cs conform to .editorconfig) (pull_request) Successful in 6s
Build ErsatzTV Image / Functional E2E (curl contracts) (pull_request) Successful in 15m51s
Build ErsatzTV Image / Build & test (.NET) (pull_request) Successful in 21m54s
Build ErsatzTV Image / Build & push image (amd64) (pull_request) Has been skipped
PR Gates / CI image pin matches docker/ci (pull_request) Successful in 12s
PR Gates / Docs update reminder (pull_request) Successful in 16s
PR Gates / decisions lifecycle (pull_request) Successful in 17s
Build ErsatzTV Image / EF migration integrity (SQLite + MySql) (pull_request) Successful in 6m14s
Build ErsatzTV Image / API docs in sync (OpenAPI + endpoint index) (pull_request) Successful in 8s
Build ErsatzTV Image / Formatting (changed .cs conform to .editorconfig) (pull_request) Successful in 6s
Build ErsatzTV Image / Functional E2E (curl contracts) (pull_request) Successful in 15m51s
Build ErsatzTV Image / Build & test (.NET) (pull_request) Successful in 21m54s
Build ErsatzTV Image / Build & push image (amd64) (pull_request) Has been skipped
Text-only follow-up; no behavior change (14/14 tests, lint clean, tsc clean).
- AutoTuneScreen.tsx: the addSource comment claimed picking a hit that is
already a base member makes "the existing row read as customised". It does
not — patchSource(id, {}) materializes a DEFAULT draft, sourceCustomized is
false for it, and sourcesRequest omits it, so the pick is a payload no-op
whose only visible effect is the query clearing. Comment now states that.
- spa-conventions.md §11: said WEIGHT_MIN/WEIGHT_MAX are "the same const pair
the multi-collection editor uses". Same VALUES, separate screen-local consts
— there is no shared module. The old wording invited a future reader to
assume a shared seam that does not exist.
Both were nits in the independent review of d3c89d87 (verdict
MERGEABLE-WITH-NITS). Fixed rather than deferred because a comment that states
the opposite of the code, and a doc that implies a nonexistent shared const,
are exactly the kind of thing the next session reads and trusts.
Remaining review nits deferred to a follow-up issue: exporting compile.ts's
Lucene escaper instead of duplicating it, an exclude-all warning, and >50-source
axis handling.
This commit is contained in:
@@ -461,9 +461,10 @@ string-keyed dispatcher, or generic screen-action framework participates in norm
|
||||
(#440 wiring #425's backend into the Auto-Tune DetailPanel's Content-sources pane). The row model is
|
||||
reusable wherever an item list carries per-item rotation weights:
|
||||
- The row's draft (`SourceDraft` in `AutoTuneScreen.tsx`) holds `weight` as a **string** per §4a, plus a
|
||||
boolean `excluded`; the shared bound `WEIGHT_MIN`/`WEIGHT_MAX` = 1..1000 mirrors the server's
|
||||
`MultiCollectionItemWeight` validator (the same const pair the multi-collection editor uses, #404) and is
|
||||
clamped on `onBlur` **and** again in the draft→request mapping.
|
||||
boolean `excluded`; the bound `WEIGHT_MIN`/`WEIGHT_MAX` = 1..1000 mirrors the server's
|
||||
`MultiCollectionItemWeight` validator — the same 1..1000 the multi-collection editor enforces (#404), but
|
||||
via its **own screen-local pair**: same values, separate consts, not a shared module. It is clamped on
|
||||
`onBlur` **and** again in the draft→request mapping.
|
||||
- **Only genuinely customised rows go on the wire.** The draft→request mapper (`sourcesRequest`) drops any
|
||||
row that is still fair-share (weight 1, not excluded, not added) and returns `undefined` when nothing is
|
||||
left, so the field is **omitted** rather than sent as an all-default array. That predicate mirrors the
|
||||
|
||||
@@ -1583,8 +1583,10 @@ function ContentSourcesSection({
|
||||
|
||||
const addSource = (item: AutoTuneMember) => {
|
||||
setAddQuery('');
|
||||
// A hit that is already a base member is not an "added" source — just mark it touched so the
|
||||
// existing row reads as customised rather than sprouting a duplicate row.
|
||||
// A hit that is already a base member is not an "added" source: materialize a DEFAULT draft for
|
||||
// it so no duplicate row sprouts. That draft is deliberately not customised (`sourceCustomized`
|
||||
// is false, and `sourcesRequest` omits it), so picking an existing member is a payload no-op —
|
||||
// the row is already listed above, and the only visible effect is the query clearing.
|
||||
patchSource(item.id, baseIds.has(item.id) ? {} : { addedTitle: item.title, addedArtwork: item.artwork ?? undefined });
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user