Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions assets/javascripts/initializers/ai-conversations-sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,9 @@ export default {
@tracked loadedSevenDayLabel = false;
@tracked loadedThirtyDayLabel = false;
@tracked loadedMonthLabels = new Set();
page = 0;
@tracked isLoading = true;
isFetching = false;
page = 0;
totalTopicsCount = 0;

constructor() {
Expand Down Expand Up @@ -123,7 +124,9 @@ export default {
}

get emptyStateComponent() {
return AiBotSidebarEmptyState;
if (!this.isLoading) {
return AiBotSidebarEmptyState;
}
}

get text() {
Expand Down Expand Up @@ -214,6 +217,8 @@ export default {
this.attachScrollListener();
} catch {
this.isFetching = false;
} finally {
this.isLoading = false;
}
}

Expand Down
4 changes: 4 additions & 0 deletions assets/stylesheets/modules/ai-bot-conversations/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,10 @@ body.has-ai-conversations-sidebar {
color: var(--primary-high);
font-size: var(--font-down-2);

&__progress {
margin-left: 0.5em;
}

&:hover,
&:focus-visible {
.d-icon {
Expand Down
6 changes: 4 additions & 2 deletions spec/system/ai_bot/homepage_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,17 @@
expect(page).to have_no_css(".ai-bot-upload")
end

xit "allows removing an upload before submission" do
it "allows removing an upload before submission" do
skip "TODO: fix this test for playwright"

ai_pm_homepage.visit
expect(ai_pm_homepage).to have_homepage

file_path = file_from_fixtures("logo.png", "images").path
attach_file([file_path]) { find(".ai-bot-upload-btn", visible: true).click }

expect(page).to have_css(".ai-bot-upload", count: 1)

# TODO: for some reason this line fails in playwright
find(".ai-bot-upload__remove").click

expect(page).to have_no_css(".ai-bot-upload")
Expand Down
Loading