Skip to content

[ZEPPELIN-6743] Mount an opt-in AI Assistant shell in the notebook sidebar - #5565

Merged
tbonelee merged 10 commits into
apache:masterfrom
voidmatcha:voidmatcha/assistant-sidebar-shell
Oct 18, 2026
Merged

tbonelee merged 10 commits into
apache:masterfrom
voidmatcha:voidmatcha/assistant-sidebar-shell

Conversation

@voidmatcha

@voidmatcha voidmatcha commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

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:react

In an authenticated notebook, open ?reactAssistant=true and 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:

  • Does the license files need to update? No
  • Is there breaking changes for older versions? No
  • Does this needs documentation? No

@voidmatcha

voidmatcha commented Oct 10, 2026 •

Copy link
Copy Markdown
Member Author

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 *.spec.* tests, including the notebook E2E spec, the review diff is +619/-8. There is no lockfile change.

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 master and the PR now targets master. The shell is styled through the AssistantScope tokens from #5562 in be69683.

'./ConfigurationTable': './src/pages/ConfigurationTable',
'./NotebookRepoList': './src/pages/NotebookRepoList'
'./NotebookRepoList': './src/pages/NotebookRepoList',
'./AssistantWorkspace': './src/pages/AssistantWorkspace'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
@voidmatcha
voidmatcha force-pushed the voidmatcha/assistant-sidebar-shell branch from 787d508 to 0342e3e Compare October 16, 2026 23:34
@voidmatcha
voidmatcha changed the base branch from branch-voidmatcha-assistant-contracts-temp to master October 16, 2026 23:34
@miinhho

miinhho commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

I have verified the asynchronous slot update and error-handling paths. Currently, calls to markForCheck() ensure that prop updates and the removal of the shell following an error are correctly reflected; I have not identified any further issues requiring modification in this area. 👍

@tbonelee
tbonelee merged commit 76a7153 into apache:master Oct 18, 2026
24 checks passed
@tbonelee

Copy link
Copy Markdown
Contributor

Merged into master (76a7153).

voidmatcha pushed a commit that referenced this pull request Oct 18, 2026
### 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants