feat(lightspeed): implement Notebooks list/dashboard view#2537
feat(lightspeed): implement Notebooks list/dashboard view#2537lokanandaprabhu wants to merge 1 commit intoredhat-developer:mainfrom
Conversation
|
Important This PR includes changes that affect public-facing API. Please ensure you are adding/updating documentation for new features or behavior. Changed Packages
|
Review Summary by QodoImplement AI notebooks dashboard with list, rename, and delete functionality
WalkthroughsDescription• Add notebooks API client with list/rename/delete operations • Implement custom hooks for notebook sessions management • Create notebooks UI tab with cards, empty state, and actions • Add comprehensive i18n translations for notebooks feature • Implement rename and delete modals with error handling Diagramflowchart LR
API["NotebooksApiClient<br/>list/rename/delete"]
HOOKS["Custom Hooks<br/>useNotebookSessions<br/>useRenameNotebook<br/>useDeleteNotebook"]
UI["Notebooks UI<br/>Cards, Empty State<br/>Modals"]
TRANS["i18n Translations<br/>6 languages"]
API -- "provides API methods" --> HOOKS
HOOKS -- "manages state & queries" --> UI
TRANS -- "localizes content" --> UI
File Changes1. workspaces/lightspeed/plugins/lightspeed/src/api/notebooksApi.ts
|
Code Review by Qodo
1. Create button does nothing
|
c76966f to
da5dbb1
Compare
| {hasNotebooks && ( | ||
| <Button | ||
| variant="primary" | ||
| className={classes.notebooksAction} | ||
| icon={<PlusCircleIcon />} | ||
| > | ||
| {t('notebooks.empty.action')} | ||
| </Button> | ||
| )} | ||
| </div> | ||
| {!hasNotebooks ? ( | ||
| <div className={classes.notebooksEmptyState}> | ||
| <CatalogIcon className={classes.notebooksIcon} /> | ||
| <Typography | ||
| variant="h6" | ||
| className={classes.notebooksHeadingEmpty} | ||
| > | ||
| {t('notebooks.empty.title')} | ||
| </Typography> | ||
| <Typography | ||
| variant="body2" | ||
| color="textSecondary" | ||
| className={classes.notebooksDescription} | ||
| > | ||
| {t('notebooks.empty.description')} | ||
| </Typography> | ||
| <Button | ||
| variant="primary" | ||
| className={classes.notebooksActionEmpty} | ||
| > | ||
| {t('notebooks.empty.action')} | ||
| </Button> |
There was a problem hiding this comment.
1. Create button does nothing 🐞 Bug ✓ Correctness
The Notebooks panel renders “Create a new notebook” buttons without any onClick behavior, so the primary call-to-action is non-functional.
Agent Prompt
### Issue description
The notebooks CTA buttons are clickable but have no behavior, making the primary action in the notebooks view non-functional.
### Issue Context
Both the header and empty-state CTAs render `<Button>` without `onClick`.
### Fix Focus Areas
- workspaces/lightspeed/plugins/lightspeed/src/components/LightSpeedChat.tsx[1117-1148]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
| <DialogActions className={classes.dialogActions}> | ||
| <Button | ||
| variant="contained" | ||
| color="error" | ||
| className={classes.deleteButton} | ||
| onClick={handleDelete} | ||
| > | ||
| {t('notebooks.delete.action')} | ||
| </Button> |
There was a problem hiding this comment.
2. Delete spammable 🐞 Bug ⛯ Reliability
DeleteNotebookModal does not disable the Delete button during an in-flight mutation, allowing multiple rapid clicks that can submit multiple DELETE requests.
Agent Prompt
### Issue description
The delete action can be triggered multiple times because the Delete button remains enabled while the async mutation is running.
### Issue Context
Conversation deletion already prevents this by disabling the confirm button using `isPending`; notebooks deletion should follow the same pattern.
### Fix Focus Areas
- workspaces/lightspeed/plugins/lightspeed/src/components/DeleteNotebookModal.tsx[89-158]
- workspaces/lightspeed/plugins/lightspeed/src/hooks/useDeleteNotebook.ts[27-42]
- workspaces/lightspeed/plugins/lightspeed/src/components/DeleteModal.tsx[43-48]
- workspaces/lightspeed/plugins/lightspeed/src/components/DeleteModal.tsx[107-114]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Made-with: Cursor
da5dbb1 to
403832d
Compare
|



Hey, I just made a Pull Request!
NOTE: This PR is dependent on #2499
Story
https://issues.redhat.com/browse/RHIDP-12349
Summary
Screenshots
Screen.Recording.2026-03-13.at.2.28.41.PM.mov
✔️ Checklist