Skip to content

[ZEPPELIN-6747] Add AI Assistant conversation list and header components - #5575

Merged
voidmatcha merged 2 commits into
apache:masterfrom
xhaktm00:ZEPPELIN-6747
Oct 18, 2026
Merged

voidmatcha merged 2 commits into
apache:masterfrom
xhaktm00:ZEPPELIN-6747

Conversation

@xhaktm00

@xhaktm00 xhaktm00 commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

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
  • ConversationList reports new conversation, selection, delete requests, and search term changes through callbacks
  • ConversationHeader reports new conversation and delete requests through callbacks

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

What type of PR is it?

Feature

Todos

  • Add ConversationList with search, distinct empty states, "Today"/"Earlier" sections, and delete requests
  • Add ConversationHeader for the selected conversation
  • Hide the delete button for read-only conversations
  • Expose the read-only state and relative time to screen readers
  • Show "Untitled conversation" for a missing or empty title, and match it in search
  • Key the empty-result message on whether a search is active
  • Check the second conversation's ID in the select and delete tests and story
  • Add stories for the empty list, search, and select and delete, plus a selected conversation, "Today"/"Earlier", and the header states
  • Add unit tests for filtering, sections, callbacks, the fallback title, the read-only marker, and relative time formats
  • 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/:

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

@voidmatcha
voidmatcha changed the base branch from master to branch-voidmatcha-assistant-storybook-temp October 16, 2026 03:53

@voidmatcha voidmatcha left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks, the components and stories look good and follow the existing patterns. Two small changes before merging:

  1. Untitled conversations: the server stores null when the create request has no title, which leaves the row button without a name and labels the delete button "Delete undefined" (ConversationList.tsx:59,92, ConversationHeader.tsx). A shared fallback such as "Untitled conversation" for the visible title and both labels would fix it.
  2. ID coverage in tests: the select and delete tests only click the first row, so they still pass if every row sends 'a' (ConversationList.spec.tsx:123,139). Clicking the second row and expecting 'b' would cover the ID the issue asks for.

Optional, not blocking:

  • A story with selectedId set would let reviewers see the selected row.
  • If the panel passes an already-filtered list, an empty result during a search shows "No conversations yet."; keying the message on searching would avoid it.
  • The read-only marker and the relative time have no tests yet.
  • Other components put import * as styles last.

@voidmatcha

voidmatcha commented Oct 17, 2026 •

Copy link
Copy Markdown
Member

@xhaktm00 #5561 is on master now. Could you rebase onto master, force-push, and then switch the base to master?

git fetch https://github.com/apache/zeppelin.git master
git rebase --onto FETCH_HEAD 4599ad2d9
git push --force-with-lease

On master, AssistantConversation also requires ownerId, canSendMessage, and updatedAt, so the ConversationHeader and ConversationList specs and stories fail to typecheck after the rebase. Please add those fields to the fixtures along with the two review items above.

The remaining review items are a visible title fallback and a select/delete test that checks the second conversation ID. Correction to my earlier review: when a create request omits the title, the server substitutes a timestamp rather than storing null. It preserves an explicit empty string. Please make the display fallback cover both missing and empty titles.

voidmatcha added a commit that referenced this pull request Oct 17, 2026
xhaktm00 and others added 2 commits October 18, 2026 09:29
Add ConversationList and ConversationHeader, the Assistant panel's
conversation browsing UI, buildable and reviewable without a server.

ConversationList takes conversation data and the selection state as
props, shows the list grouped into a "Today" section (with a relative
time) and an "Earlier" section, search with a distinct empty-search
message, and a delete request per conversation. ConversationHeader
shows the inner header for the selected conversation. Both report
every action (new conversation, selection, delete request, search
term change) through callbacks; actual deletion and its confirmation
step stay with panel assembly.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
- Show "Untitled conversation" for a missing or empty title in the list,
  the header, and both labels, and match it in search
- Key the empty-result message on whether a search is active
- Check the second conversation's ID in the select and delete tests and story
- Add a story with a selected conversation
- Test the read-only marker and the relative time formats
- Fill ownerId, canSendMessage, and updatedAt in fixtures for the master contract
- Move the styles import last

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@voidmatcha
voidmatcha changed the base branch from branch-voidmatcha-assistant-storybook-temp to master October 18, 2026 00:53
@xhaktm00

Copy link
Copy Markdown
Contributor Author

@voidmatcha Thanks for the review. Rebased onto master and force-pushed!

  • Filled ownerId, canSendMessage, and updatedAt in the fixtures
  • Added a shared "Untitled conversation" fallback for missing and empty titles, used for the visible title and both labels. Search uses the same fallback, so searching "untitled" finds conversations without a title.
  • The select and delete tests and story now click the second row and expect 'b'
  • Also applied the optional items: a Selected story, the empty message keyed on searching, tests for the read-only marker and relative time, and the styles import moved last

@voidmatcha voidmatcha left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for addressing the review feedback. I checked the updated diff at 3990561 and ran the two relevant Vitest specs locally (26 tests), the React package typecheck, ESLint on the changed TypeScript files, and Prettier. All passed. The title fallback, second-conversation ID assertions, and updated fixtures look good. I have no further code changes to request.

Two small PR description cleanups when you have a chance:

  • Please remove "Depends on #5565 (ZEPPELIN-6743) per Jira." ZEPPELIN-6747 says these components can be merged independently of the notebook shell, and #5565 has now merged.
  • Please clarify the "Both report ..." sentence: ConversationList reports selection and search term changes, while ConversationHeader does not.

@voidmatcha
voidmatcha merged commit bf65886 into apache:master Oct 18, 2026
@voidmatcha

Copy link
Copy Markdown
Member

Merged into master (bf65886).

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.

2 participants