Skip to content

Self-hosted project management for devs and their clients: tickets, time tracking, docs and meetings, with an AI assistant that cites its sources. AGPL-3.0.

Show a first summary still being written in the read-only panel

Guido Boyke690d1916df80
diff --git a/app/views/organisations/meetings/_summary_section.html.erb b/app/views/organisations/meetings/_summary_section.html.erb
index 537949c..8cc0092 100644
--- a/app/views/organisations/meetings/_summary_section.html.erb
+++ b/app/views/organisations/meetings/_summary_section.html.erb
@@ -11,7 +11,7 @@
back to the project's list.
Gate trio (plan D3, organisation.rb ai_available?/ai_enabled?):
- !ai_enabled → feature invisible (no controls, only existing summary)
+ !ai_enabled → no controls; existing summary or pending status stays visible
ai_enabled, !available → button disabled + setup hint
ai_available → active. %>
<% can_write = local_assigns.fetch(:can_write, true) %>
@@ -38,7 +38,8 @@
<% show_controls = ai_enabled && can_write %>
<div id="<%= dom_id(meeting) %>_summary_section">
- <% if summary.present? || show_controls %>
+ <%# Pending status and refresh are readable even before the first summary exists. %>
+ <% if summary.present? || in_progress || show_controls %>
<section class="mb-8 rounded-xl bg-cream-100 px-4 py-3.5">
<div class="flex flex-wrap items-center justify-between gap-3 mb-2">
<h3 class="flex items-center gap-2 text-xs font-mono uppercase tracking-wider text-cream-600">
diff --git a/spec/requests/organisations/ticket_meeting_panel_spec.rb b/spec/requests/organisations/ticket_meeting_panel_spec.rb
index 31112c5..b0e874b 100644
--- a/spec/requests/organisations/ticket_meeting_panel_spec.rb
+++ b/spec/requests/organisations/ticket_meeting_panel_spec.rb
@@ -120,17 +120,36 @@ RSpec.describe 'Ticket meeting panel', :ci_guard, type: :request do
expect(response.body).to include('Kickoff-Panel-QX')
end
- it 'refreshes a summary still being written into the panel, not into the meetings lane' do
- ActsAsTenant.with_tenant(organisation) { meeting.update!(summary_creation_flag: true) }
- sign_in reader
- panel
-
- refresh = Nokogiri::HTML(response.body)
- .at_css(%(a[href="#{organisation_project_ticket_meeting_panel_path(organisation, project, ticket, meeting_id: meeting.id)}"]))
- expect(refresh).not_to be_nil
- expect(refresh.text).to include(I18n.t('views.organisations.meetings.show.summary_refresh'))
- expect(refresh['data-turbo-frame']).to eq('ticket_meeting_panel')
- expect(response.body).not_to include('meeting_display_frame')
+ { 'first summary' => '', 'regenerated summary' => 'Summary-Body-QX' }.each do |state, existing_summary|
+ it "refreshes a pending #{state} into the read-only panel" do
+ ActsAsTenant.with_tenant(organisation) do
+ meeting.update!(generated_summary: existing_summary, summary_creation_flag: true)
+ end
+ sign_in reader
+ panel
+
+ expect(response).to have_http_status(:ok)
+ document = Nokogiri::HTML(response.body)
+ status = document.at_css('[role="status"]')
+ expect(status).not_to be_nil
+ expect(status.text).to include(I18n.t('views.organisations.meetings.show.summary_in_progress'))
+ refresh = status.at_css('a')
+ expect(refresh['href']).to eq(organisation_project_ticket_meeting_panel_path(organisation, project, ticket, meeting_id: meeting.id))
+ expect(refresh.text).to include(I18n.t('views.organisations.meetings.show.summary_refresh'))
+ expect(refresh['data-turbo-frame']).to eq('ticket_meeting_panel')
+ expect(document.css('form')).to be_empty
+ expect(response.body).not_to include('meeting_display_frame')
+
+ ActsAsTenant.with_tenant(organisation) do
+ meeting.update!(generated_summary: 'Finished-Summary-QX', summary_creation_flag: false)
+ end
+ get refresh['href'], headers: frame
+
+ expect(response).to have_http_status(:ok)
+ refreshed_panel = Nokogiri::HTML(response.body).at_css('turbo-frame#ticket_meeting_panel')
+ expect(refreshed_panel.text).to include('Finished-Summary-QX')
+ expect(refreshed_panel.css('[role="status"], form')).to be_empty
+ end
end
it 'offers the meeting page and leaves the frame for it' do