diff --git a/tasks/new/2026-0826.01.jul.feat.ui.sessions-layout-drawer-machine-2156.md b/tasks/new/2026-0826.01.jul.feat.ui.sessions-layout-drawer-machine-2156.md new file mode 100644 index 0000000..7e341f3 --- /dev/null +++ b/tasks/new/2026-0826.01.jul.feat.ui.sessions-layout-drawer-machine-2156.md @@ -0,0 +1,85 @@ +# TASK METADATA + +- **Target Files:** `ui/components/SessionsPage.tsx`, + `ui/components/sessions/WorkshopDrawer.tsx`, + `ui/components/sessions/SessionsScript.tsx` +- **Core Objective:** Overhaul visual hierarchy of `/dashboard/sessions` and + enforce strict 2-state mutually exclusive rendering in `WorkshopDrawer.tsx`. +- **Dependencies:** None. +- **Additional Important Notes:** Must use pure vanilla JavaScript for DOM + manipulation (no React/framework state). Ensure copy pills trigger accessible + notifications (aria-live/toast). Fix double emoji bug in JS. Ensure mobile + title wrapping. All changes must pass `ui/ui_scripts.test.ts`. + +--- + +## Architectural Considerations & Risks + +- **Risks:** + - **DOM Manipulation Regression:** Because this UI operates strictly on + vanilla JavaScript, changing the layout and grouping DOM elements within new + containers (like `#eventCreateState` and `#eventHandoffState`) risks + breaking existing DOM ID bindings in `SessionsScript.tsx` if IDs are changed + or misplaced. We must strictly preserve all existing DOM IDs. + - **Test Compatibility:** The client-side scripts are tested via hermetic + `new Function()` execution in `ui/ui_scripts.test.ts` (`validateJsSyntax`). + The script modifications must remain structurally valid and strictly avoid + any unsupported syntax or external framework dependencies. + - **Mobile Layout Breakage:** When fixing the long titles to wrap correctly, + we must ensure CSS properties like `word-break: break-word` and + `overflow-wrap: break-word` don't inadvertently stretch flex containers + horizontally on small screens. + +- **Alternatives:** + - The proposed container-based 2-state machine approach for + `WorkshopDrawer.tsx` is native and robust. It's the most appropriate + solution given our constraints (no client-side frameworks). Using a + class-based toggle could also work, but explicit element display + manipulation is clearer for the specific 2-state requirement. + +## Proposed Implementation + +### 1. Page Hierarchy Update (`ui/components/SessionsPage.tsx`) + +- Relocate the main header block (containing `