Skip to content

feat(ui): add collapsible navigation rail and curated haptic audio system - #2

Merged
vadde merged 1 commit into
mainfrom
feat/sidebar-toggle-and-interactive-audio
Oct 28, 2026
Merged

vadde merged 1 commit into
mainfrom
feat/sidebar-toggle-and-interactive-audio

Conversation

@vadde

@vadde vadde commented Oct 28, 2026

Copy link
Copy Markdown
Owner

Summary of Changes

This Pull Request delivers two major UI/UX and interaction enhancements to the DSA Living Documentation Portal (https://vadde.github.io/DSA/):

🌟 Key Highlights

  1. Collapsible Navigation Rail (Desktop & Mobile):

    • Sidebar Close Icon (#sidebar-close-btn): Prominently docked inside <aside class="sidebar"> top header bar. Clicking it smoothly slides the sidebar away (margin-left: calc(-1 * var(--sidebar-width)); opacity: 0; visibility: hidden;) and expands the content area for distraction-free reading.
    • Header Dock Toggle (#sidebar-dock-toggle): Positioned next to the brand badge in the top-left header for quick access.
    • Floating Edge Reopen Tab (#floating-sidebar-toggle): When the sidebar is collapsed on desktop, a high-contrast frosted glass pill (🧭 NAVIGATION) smoothly slides into the left edge (top: calc(var(--topbar-height) + 14px); left: 14px;).
    • Universal Keyboard Shortcuts: Pressing ⌘B (macOS), Ctrl+B (Windows/Linux), or [ (when not focused in inputs) toggles the sidebar instantly.
    • Persistence: User preference is remembered across sessions via localStorage.getItem('dsa_sidebar_collapsed').
    • Mobile Drawer Support: On viewports $\le 1024\text{px}$, #sidebar-close-btn smoothly dismisses the mobile drawer.
  2. Curated Web Audio Haptic Feedback Engine (HapticAudio):

    • Replaced primitive unidirectional beep with a multi-profile acoustic synthesizer:
      • expand(): Ascending exponential sine ramp (540Hz → 880Hz, 38ms) communicating unboxing and opening.
      • collapse(): Descending exponential sine ramp (780Hz → 420Hz, 38ms) communicating folding and latching shut.
      • sidebarOpen(): Resonant triangle glide (440Hz → 760Hz, 55ms) for sliding panel reveal.
      • sidebarClose(): Mechanical latch click (680Hz → 320Hz, 45ms) for solid closure.
      • tap(): Snappy high-transient iOS-style tap (920Hz → 560Hz, 22ms) for tabs, filter chips, and segmented controls.
      • copySuccess(): Celebratory dual-tone chime (C6 1046Hz + E6 1318Hz, 90ms) when copying solution code.
      • searchOpen(): Holographic digital ping (1180Hz → 1480Hz, 40ms) on ⌘K search launch.
      • themeChange(): Cosmic harmonic frequency sweep (600Hz → 1200Hz, 60ms).
      • theaterOpen(): Cinematic workbench focus chord (440Hz → 880Hz, 70ms).
    • 100% Cross-Surface Audio Consistency: Main content problem cards (<details class="problem-card">), theory sections, and sidebar headers share the exact same expand and collapse audio profiles.
    • Batch Lock Protection: During batch "Expand All" and "Collapse All", STATE.isBatchExpanding strictly mutes individual blips to prevent audio distortion and DOM thread starvation.
    • Default Tactile Setting: Audio feedback is enabled by default (dsa_audio_enabled !== 'false') for tactile interactivity, with persistent 🔊 / 🔇 muting in the HUD.
  3. Deterministic Quality Gate Auditing:

    • Enhanced Gate 6 in scripts/test-docs.sh to permanently assert #sidebar-dock-toggle, #sidebar-close-btn, #floating-sidebar-toggle, dsa_sidebar_collapsed, and HapticAudio invariants.
    • Updated custom engineering skill (.agents/skills/dsa-docs-portal/SKILL.md) and PRD (SPEC-001).

🧪 Verification Status

  • Local CI Matrix (make ci): 100% Passed
  • 12-Gate Headless Audit (make docs-test): 12 / 12 Gates Passed
  • Monospace Box Linter (make test-boxes): 43 / 43 Boxes Aligned
  • Playwright Headless Testing: Verified close button, dock toggle, floating reopen tab, hotkeys ([), and problem summary toggle in Chromium.
  • Remote CI Run: Run #40760266052 — ALL 5 JOBS PASSED ✅

@vadde
vadde merged commit 40b3200 into main Oct 28, 2026
10 checks passed
@vadde
vadde deleted the feat/sidebar-toggle-and-interactive-audio branch October 28, 2026 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant