feat(client): per-section saves beside H2 section headings, collapsed advanced options, defaults in hover hints - #132
Merged
Conversation
…ced, default-value tooltips Restore the pre-flat per-section save model on the flat card (maintainer live-host feedback): each section heading (主代理 / 子代理 / 高级选项) becomes a semantic h2 carrying its own Discard + Save pair, a section's Save writes only its own fields over the last accepted config (ride-along protection), and its validation bucket plus store write failures render under that section. The single bottom footer pair is removed. 高级选项 is a content-level disclosure collapsed by default (aria-expanded toggle inside its h2, forced open in read-only), with its actions inside the expanded body. The three numeric fields' default values move into their info-hint tooltips (aria-label + data-tip), replacing the standalone label-row note that wrapped long labels.
… tooltip defaults Section-scoped save/discard helpers anchor on the section ids (the advanced pair inside its expanded body). The flat-chrome block becomes a section-saves block pinning: three h2 section headings with their fallbacks-* ids, one action pair per section with KD-U1 disabled terms, section dirty isolation in both directions, per-section discard, the ride-along protection (a section save carries the last accepted config for the other sections), store write failures under the last-saved section, the advanced disclosure collapsed by default with aria-expanded/aria-controls and the read-only forced-open contract, the field defaults inside the info-hint tooltips with zero defaultNote spans, and the bilingual advanced.expand/collapse keys.
…ading aria-labels
3 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Applies the maintainer's live-host feedback on the flat Fallbacks card shipped in #130: the three big sections (主代理 / 子代理 / 高级选项) regain their own Discard + Save beside semantic H2 titles, the advanced options section is collapsed by default again, and the numeric fields' default values move into the hover hints so long labels stop wrapping.
Changes
df77316reference, ported onto the current flat markup — not reinvented). A section's Save writes ONLY its own fields over the last accepted config (ride-along protection), gated by that section's dirty term and validation bucket; store write failures render under the section whose Save was clicked. Disabled terms per KD-U1: save!sectionDirty || saving || !writable, discard!sectionDirty || saving. The single bottom footer is removed.<h2>elements (14px/600, idsfallbacks-main-agent/fallbacks-subagents/fallbacks-advancedpreserved,aria-label= section title so heading navigation stays clean).aria-expanded/aria-controls, forced open when read-only; the section's Discard/Save live inside the expanded body.默认值note spans are gone; each numeric field's info hint (tooltip +aria-label) carries the schema default as its final sentence (300000 ms / 8 / 5) — strictly more correct than the old span, which mislabeled a changed accepted value as the default.card-section-save-ux.md.Testing
pnpm typecheckexit 0;pnpm buildexit 0 (verify-dist host + client OK)8e6721a); QA targeted acceptance: pass, all criteria mappedNote: the section action pairs sit inside the disabled fieldset, so a real browser makes them inert when settings are read-only — pre-flat parity (
df77316did the same), documented in-code; saves still carry!writableregardless.