diff --git a/cc-registry-v2/frontend/src/pages/AllTasks.tsx b/cc-registry-v2/frontend/src/pages/AllTasks.tsx index 9bdaa3426fb..96dd72e2aaf 100644 --- a/cc-registry-v2/frontend/src/pages/AllTasks.tsx +++ b/cc-registry-v2/frontend/src/pages/AllTasks.tsx @@ -328,171 +328,159 @@ const AllTasks: React.FC = () => { /> - {/* ============================================================ - PRESENTATION MODE — flat, full-width task list - ============================================================ */} - {isPresentation ? ( - - {/* Active filters bar */} - {(selectedSupportTags.length > 0 || selectedCollection) && ( - - - {selectedSupportTags.map(tag => ( - handleSupportTagRemove(tag)} deleteIcon={} color="primary" variant="filled" sx={{ height: 24, fontSize: '0.75rem' }} /> - ))} - {selectedCollection && ( - handleCollectionChange('')} deleteIcon={} color="secondary" variant="filled" sx={{ height: 24, fontSize: '0.75rem' }} /> + {/* Main Layout: Sidebar + Content (shared across both modes) */} + + {/* Left: Support Tags Filter */} + + + + + + Support Tags ({selectedSupportTags.length}/{filteredSupportTags.length}) + + + {selectedSupportTags.length > 0 && ( + + {selectedSupportTags.map((tag) => ( + handleSupportTagRemove(tag)} deleteIcon={} color="primary" variant="filled" sx={{ height: 24, fontSize: '0.75rem' }} /> + ))} + )} - - - )} - - {loading && ( - - - - )} + + setSupportTagSearchInput(e.target.value)} + InputProps={{ startAdornment: () }} + sx={{ mb: 1 }} + /> + + + {filteredSupportTags.map((tag, index) => ( + { + if (selectedSupportTags.includes(tag)) { handleSupportTagRemove(tag); } + else { handleSupportTagAdd(tag); } + }} + > + + {tag} + + + {selectedSupportTags.includes(tag) && } + + + ))} + {filteredSupportTags.length === 0 && supportTagSearch.length >= 2 && ( + + No tags found matching "{supportTagSearch}" + + )} + - {error && {error}} + + + + + + + + + - {!loading && !error && ( + {/* Right Content */} + + {isPresentation ? ( + /* ============================================================ + PRESENTATION MODE — flat task list + ============================================================ */ <> - {sortedFlatTasks.length > 0 ? ( - - {sortedFlatTasks.map((task, idx) => ( - - - {task.name} - - - {task.support_tags.slice(0, 2).map(tag => ( - handleSupportTagAdd(tag)} - sx={{ - height: 22, - fontSize: '0.6875rem', - fontWeight: 500, - borderColor: 'divider', - color: 'text.secondary', - cursor: 'pointer', - '&:hover': { borderColor: 'primary.main', color: 'primary.main' }, - }} - /> - ))} - - - ))} - - ) : ( - - No tasks found - Try adjusting your search criteria or clearing filters. + {loading && ( + + )} - {totalPages > 1 && ( - - - - )} - - )} - - ) : ( - /* ============================================================ - GROUPED MODE — original sidebar + codebundle cards - ============================================================ */ - - {/* Left: Support Tags Filter */} - - - - - - Support Tags ({selectedSupportTags.length}/{filteredSupportTags.length}) - - - {selectedSupportTags.length > 0 && ( - - {selectedSupportTags.map((tag) => ( - handleSupportTagRemove(tag)} deleteIcon={} color="primary" variant="filled" sx={{ height: 24, fontSize: '0.75rem' }} /> - ))} - - )} - - setSupportTagSearchInput(e.target.value)} - InputProps={{ startAdornment: () }} - sx={{ mb: 1 }} - /> - - - {filteredSupportTags.map((tag, index) => ( - { - if (selectedSupportTags.includes(tag)) { handleSupportTagRemove(tag); } - else { handleSupportTagAdd(tag); } - }} - > - - {tag} - - - {selectedSupportTags.includes(tag) && } - + {error && {error}} + + {!loading && !error && ( + <> + {sortedFlatTasks.length > 0 ? ( + + {sortedFlatTasks.map((task, idx) => ( + + + {task.name} + + + {task.support_tags.slice(0, 3).map(tag => ( + handleSupportTagAdd(tag)} + sx={{ + height: 22, + fontSize: '0.6875rem', + fontWeight: 500, + borderColor: 'divider', + color: 'text.secondary', + cursor: 'pointer', + '&:hover': { borderColor: 'primary.main', color: 'primary.main' }, + }} + /> + ))} + + + ))} - ))} - {filteredSupportTags.length === 0 && supportTagSearch.length >= 2 && ( - - No tags found matching "{supportTagSearch}" + ) : ( + + No tasks found + Try adjusting your search criteria or clearing filters. )} - - - - - - - - - - - - {/* Right Content - Tasks List */} - + {totalPages > 1 && ( + + + + )} + + )} + + ) : ( + /* ============================================================ + GROUPED MODE — codebundle cards + ============================================================ */ + <> @@ -609,9 +597,10 @@ const AllTasks: React.FC = () => { )} )} - + + )} - )} + ); };