fix(web): open creation prompt or show feedback when clicking create list in lists explorer

User Report

Using the web version, how do you create a new list? I see at the top it says, Lists, so I clicked it.

Under that, there’s an option to, Create List, so I clicked it. . .

Nothing that I can tell happens.

— Russ


Investigation & Root Cause Findings

  1. Silent Early Return on + Create List (and + Folder) Clicks (auth_workspace_island.dart):

    • In packages/hfw_jaspr/lib/components/auth_workspace_island.dart (_handleCreateList, lines 742–758), clicking + Create List reads #lists-new-list-name and immediately executes:
      if (_newListName.trim().isEmpty) return;
      
    • When a user clicks + Create List directly expecting a dialog, popover, or expandable creation panel to open (matching the behavior of Import JSON right next to it, + Add Hymn to List on list detail pages, and the Create List button in the native iOS/Android/desktop apps), the handler silently returns with zero visual feedback:
      • No creation panel/modal opens to prompt for a list name and description.
      • No validation message (_errorMsg) is displayed in _buildBanners().
      • The #lists-new-list-name text input is not focused or highlighted.
    • The same silent no-op occurs in _handleCreateFolder() (lines 760–776) when clicking + Folder / + Subfolder with an empty #lists-new-folder-name input.
  2. Crowded & Visually Disconnected Toolbar Layout (auth_workspace_island_lists.dart):

    • In packages/hfw_jaspr/lib/components/auth_workspace_island_lists.dart (lines 99–284), .filter-toolbar places 8 controls into a wrapping flex bar (Search, Sort, #lists-new-folder-name, + Folder, #lists-new-list-name, #lists-new-item-desc, + Create List, and Import JSON).
    • Because #lists-new-item-desc (Optional description…) sits between #lists-new-list-name and + Create List, and the flex row wraps across lines on standard/narrow viewports, + Create List appears visually detached from the name input and looks like a standalone trigger button rather than an inline form submit button.
  3. Skipped setState / Uncleared DOM Inputs & Missing Feedback After Creation (auth_workspace_island.dart):

    • When a name is typed into #lists-new-list-name before clicking + Create List, store.createHymnList(...) → store.createUserList(...) (packages/hfw_jaspr/lib/services/web_app_store_web_lists.dart, line 136) calls notifyListeners() before _handleCreateList() resets _newListName = '' and _newItemDescription = '' (lines 755–756).
    • Because the store listener (_sub) already updated _lists during createUserList, the subsequent await _refreshWorkspaceData() call at line 757 (with forceUpdate: false) sees listsChanged == false and skips setState, leaving the DOM inputs uncleared and showing no confirmation banner (_successMsg).

Recommended Fix

  • ** Dedicated Expandable Create List / Create Folder Panel (or Modal) & Input Focus**:
    • Either make + Create List and + Folder toggle a clean, dedicated creation panel (similar to _buildImportJsonPanel and _showAddHymnPanel) with clearly labeled Name, Folder, and Description fields, or if inline inputs are kept, group them cleanly and when + Create List / + Folder is clicked with an empty name, focus the corresponding input and display a clear prompt/validation message (Please enter a name for your new list.).
  • Post-Creation State Reset & Confirmation:
    • Reset _newListName and _newItemDescription (and clear DOM input values), pass forceUpdate: true to _refreshWorkspaceData(forceUpdate: true), and set _successMsg (or optionally offer a direct link/navigation to open the newly created list).

Follow-up from the same user regarding adding songs to lists on the web version tracked in #275.

Resolved in commit a6a2570 with unit and SSR component regression tests (packages/hfw_jaspr/test/services/web_list_record_mapper_test.dart and packages/hfw_jaspr/test/components/wiki_ui_test.dart).