Modernize the Extensions tab: batched saves, collapsed sections, inline edit

The tab consolidation fixed what the page showed but not how it read. With
two extensions and nothing else configured it rendered ~1900px tall: six
cards all expanded, three paragraphs of prose before the first control, eight
Save buttons with no indication of which rows had been touched, browser
prompt() dialogs for renames, and a nine-column table with no scroll
container.

Interaction:
- Name and Category are edited in place and feed one batched save. Edited
  rows get a highlight and a left rail; a sticky bar reports the count and
  Save changes commits only those rows, routing each field to the endpoint it
  needs (rename/category through the container, tier/numbers/messaging
  through the permissions file — or the messaging-only endpoint with no
  trunk). Discard reverts; leaving with edits pending warns. Delete keeps its
  own per-row control since it is destructive.
- Categories, Rooms, Groups, Caps and Personal numbers became <details>
  sections with item counts, so the tab opens on the extensions table.
  Explanations moved behind "what this means" disclosures.
- Add-extension is behind a button; the one-time device password gets a
  persistent dismissible callout rather than a line that scrolls away.
  Everything else reports through toasts, replacing six inline message divs.

Presentation: a token-based stylesheet (spacing/radius/colour scale), sticky
translucent header, sticky table headers, status as a colour-coded pill,
focus-visible outlines, primary/secondary/danger button hierarchy, and a
.table-wrap that owns horizontal overflow. Security Log and CrowdSec cards
picked up the same card-body padding and scroll wrappers.

Verified in Chromium against a fixture Asterisk config at 1280px and 390px:
full layout opens at ~700px tall with five collapsed sections, editing two
rows marks both and shows "2 extensions edited", saving persists and clears
the dirty state, per-extension failures are reported individually rather than
swallowed, the bare no-container/no-trunk layout still collapses to
Ext/Name/Messaging with two cards and saves via the messaging-only endpoint,
and at 390px the page does not scroll horizontally while the table does.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NAddJGE1G6eGaPzmScG5Vh
This commit is contained in:
Claude
2026-07-25 02:05:35 +00:00
parent bde7e9d12d
commit 51d090ee2c
File diff suppressed because it is too large Load Diff