Repository navigation
[ZEPPELIN-6743] Mount an opt-in AI Assistant shell in the notebook sidebar - #5565
Conversation
|
This PR adds the opt-in Assistant sidebar shell and its Angular/React mount point. Conversation UI and server transport are outside this diff. The current diff is +1045/-8 across 23 files. Excluding 426 lines in The SDK build, React typecheck, focused React and Angular tests, lint, and React production build pass locally. Webpack reports an asset-size warning. #5558 and #5561 have merged, so this branch is rebased onto |
aee705e to
654d828
Compare
699239b to
3e95adf
Compare
654d828 to
d0763c9
Compare
| './ConfigurationTable': './src/pages/ConfigurationTable', | ||
| './NotebookRepoList': './src/pages/NotebookRepoList' | ||
| './NotebookRepoList': './src/pages/NotebookRepoList', | ||
| './AssistantWorkspace': './src/pages/AssistantWorkspace' |
There was a problem hiding this comment.
Non-blocking: Step 6 of Adding a new React module in the React README calls for a re-export from main.ts, but AssistantWorkspace is not re-exported there.
Module Federation loads the implementation directly through exposes, so this does not affect functionality. I verified that the production build, remote loading, and panel interactions work without the re-export. Just noting the difference between the documented procedure and this implementation.
There was a problem hiding this comment.
Thanks, this is addressed in c839b46, which adds the AssistantWorkspace re-export to main.ts as the README describes.
The opt-in Assistant host handles panel visibility and error states. Include it in the page coverage registry so the reporter tracks its currently untested browser flow. Confidence: high Scope-risk: none Not-tested: Full browser E2E and GitHub CI
Cover the flagged notebook shell through its visible sidebar controls. Create and remove a disposable notebook for each test run. Confidence: high Scope-risk: none Not-tested: full E2E suite and runtime fault injection
787d508 to
0342e3e
Compare
|
I have verified the asynchronous slot update and error-handling paths. Currently, calls to |
|
Merged into master (76a7153). |
### What is this PR for? Add `ConversationList` and `ConversationHeader`, the Assistant panel's conversation browsing UI, reviewable in Storybook without a server. **Components** * `ConversationList` * Takes conversation data and the selection state as props * Shows the list, search results, and an empty state * Shows "No conversations match your search." while a search is active and "No conversations yet." otherwise, so the message stays correct when the panel passes an already-filtered list * `ConversationHeader` * Shows the inner header for the selected conversation * Both report new conversation, selection, delete requests, and search term changes through callbacks * Deletion and its confirmation step are left to panel assembly (ZEPPELIN-6748) **Beyond the acceptance criteria** * The list groups conversations into "Today" (with a relative time) and "Earlier", within the issue's design latitude * Search shows a flat result list without sections * Read-only conversations (`canSendMessage === false`) show a lock and no delete button, and the read-only state is announced to screen readers **Title handling** * `title` is optional in the contract, and the server preserves an explicit empty title on create * A missing or empty title is shown as "Untitled conversation" in the list, the header, the row button name, and both delete labels, through a shared `conversationTitle` helper * Search matches the displayed title, so an untitled conversation is found by "untitled" **Dependencies** * #5561 is merged and this branch is rebased onto master * Depends on #5565 (ZEPPELIN-6743) per Jira ### What type of PR is it? Feature ### Todos * [x] Add `ConversationList` with search, distinct empty states, "Today"/"Earlier" sections, and delete requests * [x] Add `ConversationHeader` for the selected conversation * [x] Hide the delete button for read-only conversations * [x] Expose the read-only state and relative time to screen readers * [x] Show "Untitled conversation" for a missing or empty title, and match it in search * [x] Key the empty-result message on whether a search is active * [x] Check the second conversation's ID in the select and delete tests and story * [x] Add stories for the empty list, search, and select and delete, plus a selected conversation, "Today"/"Earlier", and the header states * [x] Add unit tests for filtering, sections, callbacks, the fallback title, the read-only marker, and relative time formats * [x] Rebase onto master and fill the fields the master contract requires in fixtures ### What is the Jira issue? ZEPPELIN-6747 ### How should this be tested? Run from `zeppelin-web-angular/projects/zeppelin-react/`: ```bash npm ci npm test npm run typecheck npm run lint npm run build:storybook npm run test:storybook npm run storybook ``` `npm test` runs 22 files and 208 tests, 26 of them new. `npm run test:storybook` runs every story in both themes (40 tests) and needs Playwright Chromium. In Storybook, check `Assistant/ConversationList` (Empty, Search, Selected, SelectAndDelete, TodayAndEarlier) and `Assistant/ConversationHeader` (Current, NoSelection, ReadOnly) in both the light and dark themes. ### Screenshots (if appropriate) N/A ### Questions: * Does the license files need to update? No * Is there breaking changes for older versions? No * Does this needs documentation? No Closes #5575 from xhaktm00/ZEPPELIN-6747. Signed-off-by: YONGJAE LEE <[email protected]>
What is this PR for?
Add an opt-in AI Assistant button and empty panel shell to the notebook sidebar. With
?reactAssistant=true, the Angular notebook mounts the React shell, coordinates it with the file tree and table of contents, and shares the sidebar width for resizing. The panel closes when the active note changes and reports the failure and removes the button if the React remote fails to load.This establishes the notebook mount point for later conversation UI work. Conversation components, server transport, and message handling are outside this PR.
#5558 and #5561 have merged. This PR is now based on master.
What type of PR is it?
Feature
Todos
What is the Jira issue?
ZEPPELIN-6743
How should this be tested?
Run from
zeppelin-web-angular/:npm run build-project:sdk npm run typecheck:react npm --prefix projects/zeppelin-react test -- src/pages/AssistantWorkspace.spec.tsx npm run test:shell -- src/app/pages/workspace/notebook/assistant src/app/pages/workspace/notebook/sidebar/sidebar.component.spec.ts src/app/services/react-feature.service.spec.ts npm run lint npm run build:reactIn an authenticated notebook, open
?reactAssistant=trueand check opening, closing, resizing, switching sidebar sections, and switching notes. Confirm that the button is absent without the flag and in view-only and revision views.Screenshots (if appropriate)
N/A
Questions: