Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

10 — Interaction Specification (Audit Module)

Module-specific interactions layered on shared 00-shared/08. Covers every input modality on phone/tablet/desktop for a read-only, high-density log surface.


1. Phone / touch

GestureBehaviourWhere
Tapopen detail, open filter sheet, clear filters, copy id/json, expand JSON noderows, filter bar, detail
Long-pressAppMenu (View entry, Copy ID, Export (planned))list rows
Swipe leftnone destructive (read-only; no delete exists) — no swipe actions
Pull downrefresh → reset page 1 (RefreshIndicator, bypasses cache)list
Pinch/dragnone (no media)
Hardware backdetail → list (filters/scroll kept); list → Settingsall

2. Keyboard / desktop / mouse

InputBehaviour
/focus filter bar (global pattern: Ctrl+K is shell search; / is in-screen filter)
Tabfilter controls → table → footer; visible primary focus ring (00-shared/09 §6)
Arrow up/downmove table row selection
Enteropen selected entry detail
Escclear filters / close filter sheet / collapse JSON
Ctrl/Cmd+Ccopy JSON on detail (with SelectableText)
Ctrl/Cmd+Ffocus filter bar (alias of /); browser-find disabled on web via semantics where possible
Right-clickcontext menu (same as long-press) on rows
Hoverrow tint m-fast; tooltip 500 ms (UTC timestamp, truncated values, full action)

3. Haptics (mobile)

EventHapticRef
Realtime entry appendedselectionClick (subtle; not disruptive)
Copy ID/JSONselectionClick
Filter appliednone
Ruledisabled when system haptics off; none on desktop08 §3

4. Motion language (module extension of 08 §4)

TransitionDuration/curveUsed by
Route push (list→detail)m-base slide (phone); master-detail pane swap m-fast (≥ 840 px)detail
Realtime appendslide-in m-base + primaryContainer flashlist
First-load rowsm-entrance stagger 40 mslist
Filter changecross-fade m-slow (content swap, no pop)list
JSON expand/collapseAnimatedSize m-fastdetail
Table hoverm-fast tintdesktop table

Reduced-motion: fades only, no stagger, no flash.

5. Micro-interactions catalogue

InteractionDetail
Row tap (table)ripple m-fast; detail pane opens m-fast (master-detail)
Load morebottom spinner fade-in m-instant; button label "Loading…"
Realtime bannerslide-in AppBanner info; auto-dismiss 6 s; tap → scroll to top + flash row
Copy ID/JSONSnackbar "Copied" + lightImpact-less (selectionClick)
Clear filterschips remove one-by-one m-fast; "Clear" resets all
Diff expandAnimatedSize; badge colors never sole signal (text + icon)

6. Frustration controls (shared 08 §6 + module)

  • All presses respond < 100 ms (m-fast ripple).
  • Every network action shows pending state (skeleton, load-more spinner) — never silent.
  • Load-more disabled while in flight (anti-duplicate pages).
  • 429 → countdown, no auto-retry.
  • Errors persist until dismissed/retried (never flash).

7. Special: realtime & clipboard interactions

  • WS lifecycle: on connect, join tenant:{tenantId} (automatic, ws.gateway.ts:50); on reconnect → resubscribe + background refetch (page 1 merge).
  • Clipboard: detail JSON copy (entire entry), correlationId copy, entry _id copy.
  • Deep link to entry: studylyon://settings/audit/:id → in-memory lookup; miss → load next pages (cap (proposed), OQ-4) → miss → empty state.

8. Validation of interaction to server semantics

  • No gesture implies edit/delete (server has no such paths — audit-log.repository.ts:6).
  • Filters map 1:1 to query params (audit.controller.ts:22-24); client never sends params the controller ignores (sort, q, dates are (planned)).
  • Realtime append derives from the same event stream as persisted entries (ws-bridge.service.ts:16-22 vs audit.handler.ts:18-25) — dedupe by _id.
  • Timestamps always from occurredAt (schema timestamps: falsecreatedAt never used for display, audit-log.schema.ts:13, 42-43).