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.
Ruby agplai-assistantdockerdsgvogdprhotwireissue-trackerjira-alternativeknowledge-basellmmcp-servermeeting-notesopen-sourceproject-managementredmine-alternativeruby-on-railsself-hostedticketingtime-tracking
Open a meeting of "Alle Meetings" in the lane and redraw that list on every save
Guido Boykeb716e63ff013
diff --git a/.github/workflows/guards.yml b/.github/workflows/guards.ymlindex c23c25c..d628682 100644--- a/.github/workflows/guards.yml+++ b/.github/workflows/guards.yml@@ -587,6 +587,8 @@ jobs:spec/requests/organisations/meetings_overview_access_spec.rbspec/requests/organisations/meetings_overview_views_spec.rbspec/requests/organisations/meetings_overview_columns_spec.rb+ spec/requests/organisations/meetings_overview_lane_spec.rb+ spec/requests/organisations/meetings_overview_lane_access_spec.rbspec/services/actors/save_smart_folder_from_filters_spec.rbspec/services/actors/save_smart_folder_concurrency_spec.rbspec/services/actors/create_ticket_relation_concurrency_spec.rbdiff --git a/app/controllers/concerns/CLAUDE.md b/app/controllers/concerns/CLAUDE.mdindex 7df18c1..2e4b666 100644--- a/app/controllers/concerns/CLAUDE.md+++ b/app/controllers/concerns/CLAUDE.md@@ -67,9 +67,14 @@ Fundamente — Tickets = dieser Stack, Knowledge = `Pageable`+`AdHocFilterable`+direkt, Notifications = bespoke + `MasterListPresenter`, Meetings =`ProjectController`+`ViewportSwitchable`+`meeting_list.rb`.`meeting_list.rb` (17.10.2026) ist der EINE Besitzer der Meeting-Liste: Projektseite-(`meeting_list_project` = `@project`) und „Alle Meetings“ (`nil`, auch der Refresh nach dem-Modal in `MeetingsController#create`). Eine Meeting-Ansicht gehört der Liste ihres Projekts,-ohne Projekt der Übersicht. Die Filterleiste, das Speichern von Ansichten und die Spaltenwahl+(`meeting_list_project` = `@project`) und „Alle Meetings“ (`nil`). Seit PR 3 öffnet auch die+Übersicht das Meeting in der Bahn; Detail und Schreibwege bleiben projektverschachtelt+(`MeetingsController`), und die Bahn trägt `list_context=organisation`+(`Meetings::ListState`, ein erlaubter Wert, nur verglichen). `meeting_organisation_list?`+ist die EINE Frage „welche Liste?“ für Stream, Weiterleitung und Rückweg (Bahn und Modal;+das frühere `context=overview_modal` ist darin aufgegangen). Der Kontext wählt nur die+Liste, die Rechte bleiben die des Projekts (`set_meeting`, Bereichs-Tor). Eine+Meeting-Ansicht gehört der Liste ihres Projekts, ohne Projekt der Übersicht. Die Filterleiste, das Speichern von Ansichten und die Spaltenwahlnehmen `project: nil` als „organisationsweit“; Tickets und Wissen geben weiter ein Projekt mit.Die Grundansicht der Spalten wählt `ViewConfiguration.for_list` (ohne Projekt nur `meetings`,Route `meetings_view_configuration`, derselbe Controller wie die Projekt-Route).diff --git a/app/controllers/concerns/meeting_list.rb b/app/controllers/concerns/meeting_list.rbindex b5bbe11..0625176 100644--- a/app/controllers/concerns/meeting_list.rb+++ b/app/controllers/concerns/meeting_list.rb@@ -8,7 +8,13 @@## the project page Organisations::MeetingsController @project# "Alle Meetings" Organisations::MeetingsOverviewController, and-# MeetingsController after a save from its modal nil+# MeetingsController for a request with+# list_context=organisation (Meetings::ListState):+# a save in the lane or the modal of that page nil+#+# #meeting_organisation_list? is the ONE question "which list?" for every+# stream, redirect and link that leads back to a list. Until 17.10.2026 the+# modal asked a question of its own (context=overview_modal).## A list shows the meeting views of its own project: a view without a project# belongs to "Alle Meetings" and shows only there (decision 3 of the plan).@@ -22,8 +28,31 @@module MeetingListextend ActiveSupport::Concern+ included do+ helper_method :meeting_organisation_list?, :meeting_list_index_path, :meetings_overview_first_use?+ end+private+ def meeting_organisation_list?+ meeting_list_project.nil?+ end++ # The address of this list, with the query given (its state, a meeting_id):+ # where a redirect, the lane's way back and its close lead.+ def meeting_list_index_path(query = {})+ project = meeting_list_project+ project ? organisation_project_meetings_path(@current_organisation, project, query) : organisation_meetings_path(@current_organisation, query)+ end++ # No readable meeting anywhere yet: "Alle Meetings" shows its first-time+ # state. Asked by both includers, the overview's list is rendered from both.+ def meetings_overview_first_use?+ return @meetings_overview_first_use if defined?(@meetings_overview_first_use)++ @meetings_overview_first_use = !policy_scope(Meeting).exists?+ end+# Sets what the list head and the rows read (@meeting_smart_folders,# @active_smart_folder, @dissolver_result, @current_search_mode, @columns,# @pagy, @meeting_list_query) and answers the page of meetings on screen.diff --git a/app/controllers/organisations/meetings_controller.rb b/app/controllers/organisations/meetings_controller.rbindex 96dd213..a793eb7 100644--- a/app/controllers/organisations/meetings_controller.rb+++ b/app/controllers/organisations/meetings_controller.rb@@ -18,6 +18,7 @@ module Organisations# Since #817 _meeting_show has no viewport branch of its own any more.before_action :set_viewport_mode, only: %i[index show new create edit update]before_action :set_meeting, only: %i[show edit update destroy create_summary toggle_search]+ before_action :redirect_organisation_list_page, only: %i[index show new]# The same literal ids live in the meetings views and the shared list-row# configuration — keep them in sync when renaming.@@ -42,12 +43,6 @@ module Organisations# button just stops working.MODAL_CANCEL_ACTION = 'click->meeting-modal#close'- # Marks a save that came from that modal. The overview page has neither- # LIST_FRAME_ID nor DETAIL_FRAME_ID, and Turbo drops a stream whose target is- # missing WITHOUT a word, so the usual success response would look like nothing- # happened. Same mechanism as the Zeiten form's `context` field.- OVERVIEW_MODAL_CONTEXT = 'overview_modal'-# The list renders only these columns (_meeting_row: title, date, duration).# Selecting full rows would de-TOAST notes/transcript/plain_text_version (up to# ~1 MB each) for every row on every list render — the detail pane loads its@@ -154,19 +149,11 @@ module Organisations# Without JavaScript the modal is a plain form post. A save that started# on "Alle Meetings" belongs back there, not in the project's own# master-detail — the same rule the turbo_stream branch follows.- if overview_modal?- redirect_to organisation_meetings_path(@current_organisation, meeting_index_query), notice: t('flash.meetings.created')- else- redirect_to organisation_project_meetings_path(- @current_organisation,- @project,- meeting_index_query.merge(meeting_id: @meeting.id)- ),- notice: t('flash.meetings.created')- end+ query = meeting_organisation_list? ? meeting_index_query : meeting_index_query.merge(meeting_id: @meeting.id)+ redirect_to meeting_list_index_path(query), notice: t('flash.meetings.created')endend- elsif overview_modal?+ elsif meeting_organisation_list?render_modal_frame_with_errors(@meeting)elserender_form_with_errors('organisations/meetings/meeting_new_for_frame')@@ -183,7 +170,7 @@ module Organisationslocals: { meeting: @meeting, detail_frame_id: detail_frame_id })endformat.html do- redirect_to organisation_project_meetings_path(@current_organisation, @project, meeting_index_query.merge(meeting_id: @meeting.id))+ redirect_to meeting_list_index_path(meeting_index_query.merge(meeting_id: @meeting.id))endendend@@ -199,16 +186,14 @@ module Organisationsrespond_to do |format|format.turbo_stream { render turbo_stream: saved_streams(@meeting, 'flash.meetings.updated') }format.html do- redirect_to organisation_project_meetings_path(@current_organisation, @project, meeting_index_query.merge(meeting_id: @meeting.id)),- notice: t('flash.meetings.updated')+ redirect_to meeting_list_index_path(meeting_index_query.merge(meeting_id: @meeting.id)), notice: t('flash.meetings.updated')endendelsif @meeting.nil?# Race: the meeting was deleted between set_meeting and the actor's own# lookup. Rendering the form with a nil meeting would 500; send the user# back to the (refreshed) list instead.- redirect_to organisation_project_meetings_path(@current_organisation, @project, meeting_index_query),- alert: t('flash.meetings.not_found')+ redirect_to meeting_list_index_path(meeting_index_query), alert: t('flash.meetings.not_found')elserender_form_with_errors('organisations/meetings/meeting_edit')end@@ -220,24 +205,25 @@ module Organisationsif @meeting.destroyrespond_to do |format|format.turbo_stream do+ # closeLane (application.js): the meeting is gone, so is its lane and+ # its meeting_id in the address, as if its ✕ had been clicked.render turbo_stream: [list_stream(selected: nil),turbo_stream.update(detail_frame_id, partial: 'organisations/meetings/meeting_placeholder'),+ turbo_stream.action(:closeLane, detail_frame_id),flash_stream('flash.meetings.deleted')]end- format.html { redirect_to organisation_project_meetings_path(@current_organisation, @project, meeting_index_query), notice: t('flash.meetings.deleted') }+ format.html { redirect_to meeting_list_index_path(meeting_index_query), notice: t('flash.meetings.deleted') }endelse- redirect_to organisation_project_meetings_path(@current_organisation, @project, meeting_index_query.merge(meeting_id: @meeting.id)),- alert: t('flash.meetings.delete_error')+ redirect_to meeting_list_index_path(meeting_index_query.merge(meeting_id: @meeting.id)), alert: t('flash.meetings.delete_error')endrescue StandardError => e# Full details go to the log only — exception messages can carry internals# (constraint names, model state) that must not reach the user's flash.Rails.logger.error "Error deleting meeting #{@meeting&.id}: #{e.class}: #{e.message}"- redirect_to organisation_project_meetings_path(@current_organisation, @project, meeting_index_query),- alert: t('flash.meetings.delete_error')+ redirect_to meeting_list_index_path(meeting_index_query), alert: t('flash.meetings.delete_error')end# POST /projects/:project_id/meetings/:id/create_summary@@ -269,8 +255,7 @@ module Organisationsrespond_to do |format|format.turbo_stream { render turbo_stream: summary_section_stream(@meeting) }format.html do- redirect_to organisation_project_meetings_path(@current_organisation, @project, meeting_index_query.merge(meeting_id: @meeting.id)),- notice: t('flash.meetings.summary_started')+ redirect_to meeting_list_index_path(meeting_index_query.merge(meeting_id: @meeting.id)), notice: t('flash.meetings.summary_started')endendend@@ -297,8 +282,7 @@ module Organisationsrespond_to do |format|format.turbo_stream { render turbo_stream: search_status_stream(@meeting, flash_key) }format.html do- redirect_to organisation_project_meetings_path(@current_organisation, @project, meeting_index_query.merge(meeting_id: @meeting.id)),- notice: t(flash_key)+ redirect_to meeting_list_index_path(meeting_index_query.merge(meeting_id: @meeting.id)), notice: t(flash_key)endendelse@@ -440,10 +424,24 @@ module Organisations@meeting = @project.meetings.find(params[:id])end- # The list this request shows (MeetingList): the project's own, or "Alle- # Meetings" after a save from that page's modal.+ # The list this request shows or redraws (MeetingList): the project's own, or+ # "Alle Meetings" for a write from that page, its lane or its modal+ # (list_context=organisation, Meetings::ListState). Only the list: set_meeting+ # and the project's area gate decide what may be read and written, with or+ # without the context.def meeting_list_project- overview_modal? ? nil : @project+ Meetings::ListState.organisation?(params) ? nil : @project+ end++ # A full page of this controller is the project page. With the context of+ # "Alle Meetings" (the address of a lane request opened on its own, a form+ # without JavaScript) it belongs to that page: its list, the meeting in its+ # lane. Otherwise the project page would show the list of the organisation.+ def redirect_organisation_list_page+ return if turbo_frame_request? || !meeting_organisation_list?++ meeting_id = @meeting&.id || (params[:meeting_id] if params[:meeting_id].is_a?(String))+ redirect_to meeting_list_index_path(meeting_index_query.merge({ meeting_id: meeting_id }.compact))enddef ad_hoc_filter_params@@ -461,21 +459,17 @@ module Organisationsend# A new meeting can be saved from two pages, and they share no frame. The- # project page refreshes its list and opens the detail; the org-wide list has- # neither of those frames, so it refreshes its own table instead and lets+ # project page refreshes its list and opens the detail; the org-wide list+ # creates in its modal, so it refreshes its own table instead and lets# meeting_modal_controller close the modal on the successful submit.def created_streams(meeting)- return overview_created_streams(meeting) if overview_modal?+ return overview_created_streams(meeting) if meeting_organisation_list?[created_address_stream(meeting)] + saved_streams(meeting, 'flash.meetings.created')enddef created_address_stream(meeting)- url = organisation_project_meetings_path(- @current_organisation,- @project,- meeting_index_query.merge(meeting_id: meeting.id)- )+ url = meeting_list_index_path(meeting_index_query.merge(meeting_id: meeting.id))view_context.turbo_stream_action_tag(:replaceAddress, target: DETAIL_FRAME_ID, url: url)end@@ -491,15 +485,10 @@ module Organisations# failed, so the flash says which of the two happened. The list is the one# MeetingsOverviewController renders (MeetingList, project nil).def overview_created_streams(meeting)- results = filtered_meetings+ list = list_stream(selected: nil)hidden = !@meeting_list_query.exists?(id: meeting.id)- [- turbo_stream.replace(OVERVIEW_LIST_FRAME_ID,- partial: 'organisations/meetings_overview/results',- locals: { meetings: results }),- flash_stream(hidden ? 'flash.meetings.created_hidden_by_filter' : 'flash.meetings.created')- ]+ [list, flash_stream(hidden ? 'flash.meetings.created_hidden_by_filter' : 'flash.meetings.created')]end# Success response for create/update: refresh the list frame (new/edited row,@@ -513,10 +502,19 @@ module Organisations]end+ # The list the request came from (MeetingList#meeting_organisation_list?),+ # with the state its form or link carried. "Alle Meetings" brings its own+ # frame in the partial, as the project list does.def list_stream(selected:)meetings = filtered_meetings- turbo_stream.replace(LIST_FRAME_ID, partial: 'organisations/meetings/meetings_results',- locals: { meetings: meetings, selected_meeting: selected })+ if meeting_organisation_list?+ turbo_stream.replace(OVERVIEW_LIST_FRAME_ID, partial: 'organisations/meetings_overview/results',+ locals: { meetings: meetings, selected_meeting: selected,+ first_use: meetings_overview_first_use? })+ else+ turbo_stream.replace(LIST_FRAME_ID, partial: 'organisations/meetings/meetings_results',+ locals: { meetings: meetings, selected_meeting: selected })+ endenddef flash_stream(flash_key, type: :notice)@@ -530,8 +528,7 @@ module Organisationsrespond_to do |format|format.turbo_stream { render turbo_stream: flash_stream(flash_key, type: :alert), status: :unprocessable_content }format.html do- redirect_to organisation_project_meetings_path(@current_organisation, @project, meeting_index_query.merge(meeting_id: @meeting.id)),- alert: t(flash_key)+ redirect_to meeting_list_index_path(meeting_index_query.merge(meeting_id: @meeting.id)), alert: t(flash_key)endendend@@ -547,7 +544,7 @@ module Organisations[turbo_stream.replace("#{helpers.dom_id(meeting)}_summary_section",partial: 'organisations/meetings/summary_section',- locals: { meeting: meeting, can_write: true }),+ locals: { meeting: meeting, can_write: true, lane_state: helpers.meeting_lane_state }),flash_stream('flash.meetings.summary_started')]end@@ -621,19 +618,18 @@ module Organisationsendend+ # The save context is not here: the modal's frame is loaded with+ # list_context=organisation (_new_meeting_modal), and the form carries it on+ # with the list state (meeting_list_hidden_fields).def modal_form_locals(meeting){meeting: meeting,detail_frame_id: MODAL_FRAME_ID,- context: OVERVIEW_MODAL_CONTEXT,+ modal: true,cancel_action: MODAL_CANCEL_ACTION}end- def overview_modal?- params[:context] == OVERVIEW_MODAL_CONTEXT- end-def meeting_params# participants: the chips field posts meeting[participants][i][display_name]# and [user_id]; the actor strips this key out before touching Meetingdiff --git a/app/controllers/organisations/meetings_overview_controller.rb b/app/controllers/organisations/meetings_overview_controller.rbindex f017c98..68ccea9 100644--- a/app/controllers/organisations/meetings_overview_controller.rb+++ b/app/controllers/organisations/meetings_overview_controller.rb@@ -10,8 +10,11 @@# (doc/meetings_uebersicht_vereinheitlichen_plan.md, PR 1): the shared filter# bar with saved views, conditions and the search depth, sort by column head,# pagination, all through MeetingList with no project. Two things exist only-# here: the condition "Projekt" and the column "Projekt". A row still opens the-# meeting on its project's page; the detail in a lane of its own comes with PR 3.+# here: the condition "Projekt" and the column "Projekt". Since PR 3 a row opens+# the meeting in the lane beside the list, and ?meeting_id= opens it on a full+# visit. The detail and every write in it stay project-nested+# (MeetingsController, list_context=organisation); this controller only renders+# the selected meeting on a full visit.## The title box carries a "+" that opens a modal with a project select, and the# modal's turbo-frame loads the real form from the project-nested@@ -44,19 +47,43 @@ module Organisationsdef index@meetings = filtered_meetings- return unless turbo_frame_request?+ if turbo_frame_request?+ render_list_frame+ return+ end++ @selected_meeting = find_selected_meeting+ MeetingTicketSuggestionRun.recover_for_meeting!(@selected_meeting)+ # The claim hint (Nachtrag) is rendered lazily via the meeting_claim_matches+ # helper (shared with the project index), nothing to set up here.+ end++ private+ # The bar's two frames: the list, and the sentence of its chips.+ def render_list_framecase request.headers['Turbo-Frame']when LIST_FRAME_IDrender partial: 'organisations/meetings_overview/results', locals: { meetings: @meetings }when "#{LIST_FRAME_ID}_sentence"render partial: 'organisations/meetings_overview/list_head'end- # The claim hint (Nachtrag) is rendered lazily via the meeting_claim_matches- # helper (shared with the project index), nothing to set up here.end- private+ # The meeting a full visit opens in the lane: through policy_scope(Meeting)+ # only, so an id of an unreadable project or another organisation is no+ # meeting at all, and nothing of it is rendered, not even its title. The+ # full row, not the list's narrow select (the detail renders notes and+ # transcript). @project stays unset: the lane names meeting.project itself,+ # and the list here belongs to no project (MeetingList).+ def find_selected_meeting+ meeting_id = params[:meeting_id]+ return unless meeting_id.is_a?(String) && meeting_id.present?++ meeting = policy_scope(Meeting).find_by(id: meeting_id)+ authorize(meeting, :show?) if meeting+ meeting+ end# MeetingList: this list belongs to no project.def meeting_list_project@@ -104,15 +131,6 @@ module Organisationsendhelper_method :meeting_filter_projects- # No readable meeting anywhere yet: the list shows its first-time state. The- # filter bar stands anyway (_list_head explains why).- def meetings_overview_first_use?- return @meetings_overview_first_use if defined?(@meetings_overview_first_use)-- @meetings_overview_first_use = !policy_scope(Meeting).exists?- end- helper_method :meetings_overview_first_use?-# The projects the "+" may offer: where this person may WRITE meetings. Read# access is not enough: the modal's form would be refused by the area gate in# MeetingsController, and a button that leads to an error message is a promisediff --git a/app/helpers/meetings_helper.rb b/app/helpers/meetings_helper.rbindex 29fac1a..85d8321 100644--- a/app/helpers/meetings_helper.rb+++ b/app/helpers/meetings_helper.rb@@ -1,14 +1,27 @@# frozen_string_literal: truemodule MeetingsHelper+ # Below this width a meetings list shows either the list or the meeting, on+ # the phone layout. The row opener's number (FULL_PAGE_BELOW_PX in+ # lib/list_row/address.js): narrower, a lane would cover the list.+ LANE_FULL_PAGE_BELOW_PX = 1024+def meeting_list_state(pagy: nil)state = Meetings::ListState.extract(params)state['page'] = pagy.page.to_s if pagy && state.key?('page')stateend+ # What the lane's forms and links carry: the state of the list it was opened+ # from, and which list that is (list_context, Meetings::ListState). A save+ # redraws that list with that state. Rendered only by the two controllers of+ # MeetingList, whose helper answers the question.+ def meeting_lane_state+ meeting_list_state.merge(Meetings::ListState.context_query(organisation: meeting_organisation_list?))+ end+def meeting_list_hidden_fields- safe_join(URI.decode_www_form(meeting_list_state.to_query).map { |key, value| hidden_field_tag(key, value) })+ safe_join(URI.decode_www_form(meeting_lane_state.to_query).map { |key, value| hidden_field_tag(key, value) })end# The categories of the meetings filter bar, every option from `scope`, the@@ -49,6 +62,43 @@ module MeetingsHelperendend+ # The wrapper of a meetings list page with its lane, the element that carries+ # the page's controllers: the project page and "Alle Meetings" share it+ # (doc/meetings_uebersicht_vereinheitlichen_plan.md, PR 3) and differ in their+ # address, their list frame and whether the lane knows a form state (the+ # project page's "+"). layout-toggle is the page's one writer of the address+ # (syncUrlFromFrame, the list state in list_filter_params); the row opener+ # and the ✕ write the lane part. The column picker's wiring is merged in by+ # the page (meeting_column_picker_data).+ def meeting_list_page_data(index_url:, list_frame_id:, viewport_mode:, lane_forms: [])+ detail_frame_id = Organisations::MeetingsController::DETAIL_FRAME_ID+ {+ controller: 'layout-toggle hover-arrows index-page keyboard-navigation viewport column-picker',+ hover_arrows_layout_toggle_outlet: '.labor-layout-view',+ layout_toggle_list_frame_ids_value: [list_frame_id].to_json,+ layout_toggle_detail_frame_id_value: detail_frame_id,+ layout_toggle_content_selector_value: '.meeting-content',+ layout_toggle_selected_row_selector_value: '.selected-row[data-meeting-id]',+ layout_toggle_selection_params_value: %w[meeting_id].to_json,+ layout_toggle_list_filter_params_value: Meetings::ListState::KEYS.to_json,+ layout_toggle_storage_key_value: 'layoutState:meetings',+ layout_toggle_clear_detail_on_close_value: 'true',+ viewport_breakpoint_value: LANE_FULL_PAGE_BELOW_PX,+ index_page_param_name_value: 'meeting_id',+ index_page_frame_id_value: detail_frame_id,+ index_page_content_selector_value: '.meeting-content',+ index_page_placeholder_id_value: 'meeting-display-placeholder',+ index_page_placeholder_class_value: 'ticket-placeholder px-4',+ index_page_placeholder_title_value: t('views.organisations.meetings.index.placeholder_title'),+ index_page_placeholder_body_value: t('views.organisations.meetings.index.placeholder_body'),+ index_page_selected_row_selector_value: '.selected-row[data-meeting-id]',+ index_page_skip_if_content_visible_value: 'true',+ viewport_current_mode_value: viewport_mode,+ index_url: index_url,+ lane_params: lane_params_json(selection: %w[meeting_id], form: lane_forms)+ }+ end+# The placeholders column_picker_controller fills in itself, passed through# the translation as they are.COLUMN_PICKER_NAME_TOKEN = '%{name}' # rubocop:disable Style/FormatStringTokendiff --git a/app/services/meetings/list_state.rb b/app/services/meetings/list_state.rbindex 5086fa4..1dd634f 100644--- a/app/services/meetings/list_state.rb+++ b/app/services/meetings/list_state.rb@@ -4,13 +4,33 @@# Whitelists the state shared by list URLs, forms and redirects.module Meetings# The list's address contract, shared by forms, links, and frame responses.+ #+ # Beside it the lane's list context (doc/meetings_uebersicht_vereinheitlichen_plan.md,+ # PR 3): the detail of a meeting is project-nested, and opened from "Alle+ # Meetings" its forms and links carry list_context=organisation, so that a save+ # redraws that list and not the project's. One allowed value, compared and+ # never interpolated; any other value is the project list. It chooses which+ # list is rendered, never what anyone may read. Not part of KEYS: it is no+ # state of a list, and no list address carries it.module ListStateSCALAR_KEYS = %w[search search_mode participant smart_folder_id page items limit viewport].freezeNESTED_KEYS = %w[filter filter_op filter_drop sort].freezeKEYS = (SCALAR_KEYS + NESTED_KEYS).freeze+ CONTEXT_KEY = 'list_context'+ ORGANISATION_CONTEXT = 'organisation'+def self.extract(params)params.permit(*SCALAR_KEYS, filter: {}, filter_op: {}, filter_drop: [], sort: %i[column direction]).to_h.compact_blankend++ def self.organisation?(params)+ params[CONTEXT_KEY] == ORGANISATION_CONTEXT+ end++ # The context as query parameters: what a form or a link of the lane adds.+ def self.context_query(organisation:)+ organisation ? { CONTEXT_KEY => ORGANISATION_CONTEXT } : {}+ endendenddiff --git a/app/views/organisations/meetings/_form_lane_head.html.erb b/app/views/organisations/meetings/_form_lane_head.html.erbindex 2ff4d9b..2957d1c 100644--- a/app/views/organisations/meetings/_form_lane_head.html.erb+++ b/app/views/organisations/meetings/_form_lane_head.html.erb@@ -1,11 +1,7 @@<%# locals: (new_form:) %><% icon_button = 'inline-flex h-8 w-8 items-center justify-center rounded-md text-cream-500 transition-colors hover:bg-cream-200 hover:text-cream-900 focus-visible:bg-cream-200 focus-visible:text-cream-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ink focus-visible:ring-offset-2' %>-<% close_url = organisation_project_meetings_path(- @current_organisation,- @project,- meeting_list_state- ) %>-<div class="flex items-center gap-4 mb-2" data-lane-head>+<% close_url = meeting_list_index_path(meeting_list_state) %>+<div class="flex items-center gap-4 mb-2" data-lane-head data-lane-index-url="<%= organisation_project_meetings_path(@current_organisation, @project) %>"><span class="hidden lg:inline font-mono text-[13px] tracking-wide text-cream-500"><%= t('views.organisations.meetings.show.type_label') %></span>diff --git a/app/views/organisations/meetings/_index_desktop.html.erb b/app/views/organisations/meetings/_index_desktop.html.erbindex 1378b76..2644d05 100644--- a/app/views/organisations/meetings/_index_desktop.html.erb+++ b/app/views/organisations/meetings/_index_desktop.html.erb@@ -1,6 +1,7 @@+<%# locals: (list:) %><%# Desktop two-column master-detail (list + detail frame), mirroring Knowledge.- The list partial brings its own <turbo-frame id="meetings_results"> — do NOT- re-wrap it here. %>+ Shared by the project page and "Alle Meetings": list is the page's own head+ and results, and the results partial brings its own list frame. %><%= render NeoTwoColumnGridComponent.new(selected_item: @selected_meeting || @new_meeting,context_type: :meetings,@@ -10,8 +11,7 @@lane: true) do |grid| %><% grid.with_list do %>- <%= render 'organisations/meetings/list_head' %>- <%= render 'organisations/meetings/meetings_results', meetings: @meetings, selected_meeting: @selected_meeting %>+ <%= list %><% end %><% grid.with_side_panel do %>diff --git a/app/views/organisations/meetings/_index_mobile.html.erb b/app/views/organisations/meetings/_index_mobile.html.erbindex 1f2e3b6..733941f 100644--- a/app/views/organisations/meetings/_index_mobile.html.erb+++ b/app/views/organisations/meetings/_index_mobile.html.erb@@ -1,16 +1,18 @@+<%# locals: (list:) %><div class="meeting-mobile-grid list" data-column-picker-target="grid"><%# Mobile: list OR full-screen detail with a back button (Tickets pattern).- Frame ids identical to desktop so the search frame reload works on mobile. %>+ Frame ids identical to desktop so the search frame reload works on mobile.+ Shared by the project page and "Alle Meetings": list is the page's own head+ and results, and the way back leads to this page's list (MeetingList). %><% back_query = request.query_parameters.except('meeting_id', 'new', 'frame', 'frame_id', 'format') %><%= render NeoMobileTicketViewComponent.new(selected_item: @selected_meeting || @new_meeting,show_detail: @selected_meeting.present? || @new_meeting.present?,- back_url: organisation_project_meetings_path(@current_organisation, @project, back_query),+ back_url: meeting_list_index_path(back_query),back_label: t('views.organisations.meetings.index.mobile_list_view')) do |mobile| %><% mobile.with_list do %>- <%= render 'organisations/meetings/list_head' %>- <%= render 'organisations/meetings/meetings_results', meetings: @meetings, selected_meeting: @selected_meeting %>+ <%= list %><% end %><% mobile.with_detail do %>diff --git a/app/views/organisations/meetings/_lane_head.html.erb b/app/views/organisations/meetings/_lane_head.html.erbindex e529cd5..8bd7bf8 100644--- a/app/views/organisations/meetings/_lane_head.html.erb+++ b/app/views/organisations/meetings/_lane_head.html.erb@@ -1,17 +1,20 @@<%# locals: (meeting:, current_frame_id:) %><%# Meeting-specific twin of the ticket/knowledge lane head. Routes and the- always-available mobile assistant entry deliberately remain meeting-owned. %>+ always-available mobile assistant entry deliberately remain meeting-owned.+ The way back leads to the list the lane was opened from (MeetingList:+ the project page or "Alle Meetings"), and data-lane-index-url names the+ index the lane's own routes belong to, so layout_toggle hands its controls+ the list state when the list changes beside an open lane. %><% icon_button = 'inline-flex h-11 w-11 lg:h-8 lg:w-8 items-center justify-center rounded-md text-cream-500 transition-colors hover:bg-cream-200 hover:text-cream-900 focus-visible:bg-cream-200 focus-visible:text-cream-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ink focus-visible:ring-offset-2' %><% can_write = policy(meeting.project).area_access?(:meetings, :write) %><% assistant = assistant_trigger_attributes(meeting) %>-<% back_query = request.query_parameters.except('meeting_id', 'new', 'frame', 'frame_id', 'format') %>-<div class="flex items-center gap-4 mb-2" data-lane-head>+<div class="flex items-center gap-4 mb-2" data-lane-head data-lane-index-url="<%= organisation_project_meetings_path(@current_organisation, meeting.project) %>"><span class="hidden lg:inline font-mono text-[13px] tracking-wide text-cream-500"><%= t('views.organisations.meetings.show.type_label') %></span><% unless @viewport_mode == 'mobile' %>- <a href="<%= organisation_project_meetings_path(@current_organisation, meeting.project, back_query) %>"+ <a href="<%= meeting_list_index_path(meeting_list_state) %>"data-lane-backdata-turbo-frame="_top"class="inline-flex lg:hidden h-8 items-center gap-1 rounded-lg px-2 -ml-2 text-[13px] font-normal text-cream-600 transition-colors hover:bg-cream-100 hover:text-cream-900 focus-visible:bg-cream-100 focus-visible:text-cream-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ink">@@ -28,7 +31,7 @@meeting,format: :turbo_stream,frame_id: current_frame_id,- **meeting_list_state.symbolize_keys,+ **meeting_lane_state.symbolize_keys,viewport: @viewport_mode) %>"class="<%= icon_button %>"diff --git a/app/views/organisations/meetings/_meeting_edit.html.erb b/app/views/organisations/meetings/_meeting_edit.html.erbindex 29778b2..6a7a671 100644--- a/app/views/organisations/meetings/_meeting_edit.html.erb+++ b/app/views/organisations/meetings/_meeting_edit.html.erb@@ -22,7 +22,7 @@confirm: t('views.confirm.are_you_sure'),form: {action: organisation_project_meeting_path(@current_organisation, @project, meeting,- **meeting_list_state.symbolize_keys,+ **meeting_lane_state.symbolize_keys,viewport: @viewport_mode),method: :delete}@@ -37,7 +37,7 @@variant: :edit,url: organisation_project_meeting_path(@current_organisation, @project, meeting,frame: 'content', frame_id: current_frame_id,- **meeting_list_state.symbolize_keys,+ **meeting_lane_state.symbolize_keys,viewport: @viewport_mode),data: { turbo_frame: current_frame_id }) do %>diff --git a/app/views/organisations/meetings/_meeting_new_for_frame.html.erb b/app/views/organisations/meetings/_meeting_new_for_frame.html.erbindex 220b145..312c002 100644--- a/app/views/organisations/meetings/_meeting_new_for_frame.html.erb+++ b/app/views/organisations/meetings/_meeting_new_for_frame.html.erb@@ -1,14 +1,16 @@-<%# locals: (meeting:, detail_frame_id: nil, context: nil, cancel_action: nil) %>+<%# locals: (meeting:, detail_frame_id: nil, modal: false, cancel_action: nil) %><%# The ONE "new meeting" form, rendered into whichever frame asked for it: thedetail pane of the project master-detail, or the modal on the org-wide list.Submits as turbo_stream — MeetingsController#create decides what to refresh from- the `context` field below, because the two pages have different frames.+ the list context in the hidden fields (list_context, Meetings::ListState),+ because the two pages have different frames.- context / cancel_action are the modal's two additions: where the save came from- and how "Abbrechen" closes (a link back to the list makes no sense inside a- modal). The org-wide list's state, its project condition included, travels in- the same hidden fields as the project list's (meeting_list_hidden_fields). %>-<% modal_context = context.present? %>+ modal / cancel_action are the modal's two additions: its frame without the+ lane head, and how "Abbrechen" closes (a link back to the list makes no sense+ inside a modal). Where the save came from and the org-wide list's state, its+ project condition included, travel in the same hidden fields as the project+ list's (meeting_list_hidden_fields). %>+<% modal_context = modal %><div id="meeting-form-card" class="<%= modal_context ? 'bg-cream-50 py-6 px-8 rounded-lg border border-cream-300 relative' : 'meeting-content min-w-0 relative' %>"><% current_frame_id = detail_frame_id || 'meeting_display_frame' %><% unless modal_context %>@@ -20,7 +22,6 @@<%= form_with(model: [@current_organisation, @project, meeting], format: :turbo_stream,data: { turbo_frame: current_frame_id }) do |form| %><%= hidden_field_tag :frame_id, current_frame_id %>- <%= hidden_field_tag :context, context if context.present? %><%# Carry the active list filter through the write flow — the successturbo_stream re-renders the list the form was opened from; without this thefiltered list silently snaps back to "all". %>@@ -35,11 +36,7 @@<% cancel_options = if cancel_action.present?{ type: 'button', data: { action: cancel_action } }else- { url: organisation_project_meetings_path(- @current_organisation,- @project,- meeting_list_state- ),+ { url: meeting_list_index_path(meeting_list_state),data: { turbo_frame: '_top', lane_back: true } }end %><%= render Neo::Buttons::ButtonComponent.new(variant: :edit, **cancel_options) do %>diff --git a/app/views/organisations/meetings/_meeting_row.html.erb b/app/views/organisations/meetings/_meeting_row.html.erbindex 0b295e1..619271a 100644--- a/app/views/organisations/meetings/_meeting_row.html.erb+++ b/app/views/organisations/meetings/_meeting_row.html.erb@@ -1,28 +1,26 @@-<%# locals: (meeting:, selected_meeting: nil, opens_in_lane: true) %>+<%# locals: (meeting:, selected_meeting: nil) %><%selected_id = selected_meeting&.id || params[:meeting_id]is_selected = selected_id == meeting.id- # The project page opens the meeting in its lane; "Alle Meetings" has none- # yet and opens it on the meeting's own project page, the title a real link- # for the keyboard (clickable-row leaves clicks on a link alone).- detail_url = opens_in_lane ? organisation_project_meeting_path(@current_organisation, @project, meeting) : organisation_project_meetings_path(@current_organisation, meeting.project, meeting_id: meeting.id)- row_data = if opens_in_lane- { controller: 'list-row', list_row_url_value: detail_url, list_row_id_value: meeting.id, list_row_param_value: 'meeting_id',- list_row_params_value: %w[meeting_id].to_json, list_row_frame_value: 'meeting_display_frame',- meetings_row_item_id_value: meeting.id, meeting_id: meeting.id, action: 'click->list-row#click' }- else- { controller: 'clickable-row', clickable_row_url_value: detail_url, meeting_id: meeting.id, action: 'click->clickable-row#click' }- end+ # Both lists open the meeting in their lane. The detail is project-nested,+ # so the address names the meeting's own project (on "Alle Meetings" there is+ # no @project), and on "Alle Meetings" it says which list the lane belongs to+ # (list_context, MeetingList): a save there redraws that list.+ detail_url = organisation_project_meeting_path(@current_organisation, meeting.project_id, meeting,+ Meetings::ListState.context_query(organisation: meeting_organisation_list?))+ row_data = { controller: 'list-row', list_row_url_value: detail_url, list_row_id_value: meeting.id, list_row_param_value: 'meeting_id',+ list_row_params_value: %w[meeting_id].to_json, list_row_frame_value: 'meeting_display_frame',+ meetings_row_item_id_value: meeting.id, meeting_id: meeting.id, action: 'click->list-row#click' }# Cell widths MUST stay in sync with the <th> widths in _meetings_table.%>-<%= tag.tr data: row_data, tabindex: (-1 if opens_in_lane),+<%= tag.tr data: row_data, tabindex: -1,class: "transition-colors duration-100 ease-in-out cursor-pointer focus:outline-none hover:bg-cream-100 #{'selected-row' if is_selected}" do %><% @columns.each do |column| %><td data-column="<%= column[:key] %>" <%= tag.attributes(data: { rank: column[:rank] }) %>style="<%= column_min_width_style(column) %>" class="p-3 text-sm <%= column[:required] ? 'title-column' : column_align_class(column) %>"><% if column[:key] == 'title' %><h5 class="text-sm font-medium truncate">- <%= opens_in_lane ? meeting.title : link_to(meeting.title, detail_url, data: { turbo_frame: '_top' }, class: 'text-cream-900 hover:text-ink hover:underline') %>+ <%= meeting.title %></h5><div class="ticket-meta text-[11px] text-muted truncate"><% @columns.reject { |item| item[:required] }.each do |item| %>diff --git a/app/views/organisations/meetings/_meeting_show.html.erb b/app/views/organisations/meetings/_meeting_show.html.erbindex c95265e..fc54462 100644--- a/app/views/organisations/meetings/_meeting_show.html.erb+++ b/app/views/organisations/meetings/_meeting_show.html.erb@@ -60,7 +60,7 @@<div class="border-b border-cream-300 mt-5 mb-6"></div><div class="width-text">- <%= render 'organisations/meetings/summary_section', meeting: meeting, can_write: can_write %>+ <%= render 'organisations/meetings/summary_section', meeting: meeting, can_write: can_write, lane_state: meeting_lane_state %><% if meeting.notes.blank? && meeting.transcript.blank? %><div class="text-sm text-cream-600 italic py-2">@@ -73,7 +73,7 @@meeting,format: :turbo_stream,frame_id: current_frame_id,- **meeting_list_state.symbolize_keys,+ **meeting_lane_state.symbolize_keys,viewport: @viewport_mode),data: { turbo_frame: current_frame_id },@@ -116,7 +116,7 @@meeting: meeting,analyses: visible_analyses,can_write: can_write %>- <%= render 'organisations/meetings/ticket_suggestions_section', meeting: meeting %>+ <%= render 'organisations/meetings/ticket_suggestions_section', meeting: meeting, lane_state: meeting_lane_state %></div><%= render 'organisations/meetings/ticket_links_section', meeting: meeting %>diff --git a/app/views/organisations/meetings/_meetings_results.html.erb b/app/views/organisations/meetings/_meetings_results.html.erbindex df2ec42..162a605 100644--- a/app/views/organisations/meetings/_meetings_results.html.erb+++ b/app/views/organisations/meetings/_meetings_results.html.erb@@ -50,7 +50,7 @@<% end %><% else %><%= render 'organisations/meetings/meetings_table', meetings: meetings, selected_meeting: selected_meeting,- base_path: organisation_project_meetings_path(@current_organisation, @project), frame_id: 'meetings_results', opens_in_lane: true %>+ base_path: organisation_project_meetings_path(@current_organisation, @project), frame_id: 'meetings_results' %><% end %><% if @pagy.count.positive? %><%= render 'shared/pagination_nav_compact', pagy: @pagy, frame_id: 'meetings_results', items_per_page: @pagy.limit,diff --git a/app/views/organisations/meetings/_meetings_table.html.erb b/app/views/organisations/meetings/_meetings_table.html.erbindex 8524e1f..ca5baae 100644--- a/app/views/organisations/meetings/_meetings_table.html.erb+++ b/app/views/organisations/meetings/_meetings_table.html.erb@@ -1,4 +1,4 @@-<%# locals: (meetings:, selected_meeting:, base_path:, frame_id:, opens_in_lane:) %>+<%# locals: (meetings:, selected_meeting:, base_path:, frame_id:) %><%# The table of a meetings list, shared by the project page(meetings/_meetings_results) and "Alle Meetings" (meetings_overview/_results).Heads and cells come from @columns (Lists::ResolveColumns) with rank,@@ -7,8 +7,7 @@column_picker_controller's). On a phone no ranked column stands in the head(data-fit 0), so the table never scrolls sideways.base_path and frame_id are the list's own: a sort link reloads that frame.- opens_in_lane: a row opens the meeting in the lane beside the list (project- page), or on its project's page ("Alle Meetings", until its lane). %>+ A row opens the meeting in the lane beside the list, on both pages. %><div class="relative w-full overflow-x-auto"><table class="w-full meeting-table" data-fit="<%= @viewport_mode == 'mobile' ? 0 : initial_column_fit(@columns.reject { |column| column[:required] }, content_open: selected_meeting.present? || params[:meeting_id].present? || params[:new] == 'meeting') %>" data-column-count="<%= @columns.size %>"><thead>@@ -24,7 +23,7 @@</thead><tbody><% meetings.each do |meeting| %>- <%= render 'organisations/meetings/meeting_row', meeting: meeting, selected_meeting: selected_meeting, opens_in_lane: opens_in_lane %>+ <%= render 'organisations/meetings/meeting_row', meeting: meeting, selected_meeting: selected_meeting %><% end %><%= render 'shared/ruled_rows', missing: @pagy.limit - meetings.size, colspan: @columns.size unless @viewport_mode == 'mobile' %></tbody>diff --git a/app/views/organisations/meetings/_search_status.html.erb b/app/views/organisations/meetings/_search_status.html.erbindex 1aee419..79d108d 100644--- a/app/views/organisations/meetings/_search_status.html.erb+++ b/app/views/organisations/meetings/_search_status.html.erb@@ -22,7 +22,7 @@<% ai_available = org&.ai_available_for?(:content_indexing)&.available? %><% status = meeting_search_status(meeting, ai_available: ai_available) %><% style = meeting_search_status_style(status) %>-<% filter_params = meeting_list_state %>+<% filter_params = meeting_lane_state %><div id="<%= dom_id(meeting) %>_search_status" class="flex flex-wrap items-center gap-2 mt-2"><%= render NeoInfoTagComponent.new(diff --git a/app/views/organisations/meetings/_summary_section.html.erb b/app/views/organisations/meetings/_summary_section.html.erbindex ef055f1..23b2a3a 100644--- a/app/views/organisations/meetings/_summary_section.html.erb+++ b/app/views/organisations/meetings/_summary_section.html.erb@@ -4,12 +4,18 @@helpers (params, policy, current_user). The AI gate reads frommeeting.organisation; can_write defaults true in broadcasts, mirroring theDocumentVersion _version_row pattern (the POST is server-authorized regardless).+ lane_state likewise comes from the request renders only (_meeting_show,+ MeetingsController#summary_section_stream): the list state and context+ (meeting_lane_state) for the POST and the refresh link, so both keep the+ list the lane was opened from. A broadcast has none, and its links fall+ 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, !available → button disabled + setup hintai_available → active. %><% can_write = local_assigns.fetch(:can_write, true) %>+<% lane_state = local_assigns.fetch(:lane_state, {}).symbolize_keys %><% org = meeting.organisation %><% ai_enabled = org&.ai_enabled? %><%# R2: asks the FEATURE this section offers — :meeting_summary, whose seam is@@ -44,7 +50,7 @@size: :small,icon: "magic",disabled: summary_disabled,- form: summary_disabled ? nil : { action: create_summary_organisation_project_meeting_path(org, meeting.project, meeting), method: :post }+ form: summary_disabled ? nil : { action: create_summary_organisation_project_meeting_path(org, meeting.project, meeting, **lane_state), method: :post }) do %><% if error.present? %><%= t('views.organisations.meetings.show.summary_retry') %>@@ -66,7 +72,7 @@<%# Fallback for when the live broadcast is not delivered: reload thedetail frame in request context (correct permissions + latest state). %><%= link_to t('views.organisations.meetings.show.summary_refresh'),- organisation_project_meeting_path(org, meeting.project, meeting, frame: 'content'),+ organisation_project_meeting_path(org, meeting.project, meeting, frame: 'content', **lane_state),data: { turbo_frame: 'meeting_display_frame' },class: 'not-italic underline hover:text-ink' %></p>diff --git a/app/views/organisations/meetings/_ticket_suggestions_section.html.erb b/app/views/organisations/meetings/_ticket_suggestions_section.html.erbindex 781eb66..c907d40 100644--- a/app/views/organisations/meetings/_ticket_suggestions_section.html.erb+++ b/app/views/organisations/meetings/_ticket_suggestions_section.html.erb@@ -1,9 +1,12 @@-<%# locals: (meeting:, announce: false, announce_links: false) %>+<%# locals: (meeting:, announce: false, announce_links: false, lane_state: {}) %><%# "Ticket-Vorschläge" on the meeting detail (GesprächeSlice 8, E22). Rendered ONLY in request context (from _meeting_show AND thecontroller's turbo_stream replace — NO broadcast, E21), so policy/current_userare safe here. Wrapped in its own turbo-frame so run/accept/dismiss refresh justthis block. Permissions are computed here so it renders identically either way.+ lane_state: the list state and context of the lane (meeting_lane_state), given+ by _meeting_show only, so the refresh link reloads the detail for the list it+ was opened from; the controller's replace has none and reloads for the project.NB: do NOT start this comment with "locals:" — Rails reads it as the strictlocals signature and chokes on the prose. %><% project = meeting.project %>@@ -71,7 +74,7 @@<i class="bi bi-arrow-repeat inline-block animate-spin" aria-hidden="true"></i><%= t('views.organisations.meetings.ticket_suggestions.in_progress') %><%= link_to t('views.organisations.meetings.ticket_suggestions.refresh'),- organisation_project_meeting_path(org, project, meeting, frame: 'content'),+ organisation_project_meeting_path(org, project, meeting, frame: 'content', **lane_state.symbolize_keys),data: { turbo_frame: 'meeting_display_frame' },class: 'not-italic underline hover:text-ink' %></p>diff --git a/app/views/organisations/meetings/index.html.erb b/app/views/organisations/meetings/index.html.erbindex 078dbc8..36c5379 100644--- a/app/views/organisations/meetings/index.html.erb+++ b/app/views/organisations/meetings/index.html.erb@@ -1,7 +1,8 @@<%# Meetings (Gespräche) master-detail — Slice 1a. List left, detail in a Turboframe right; layout-toggle + viewport drive the list/detail switch (desktopcollapse + mobile). Search reloads only the list frame so the detail pane- survives. %>+ survives. The wrapper and the grid are shared with "Alle Meetings"+ (meeting_list_page_data, _index_desktop, _index_mobile). %><% content_for :head do %><meta name="turbo-cache-control" content="no-cache"><%# Keep Turbo visits alive: a full reload discards the permanent assistant's@@ -12,34 +13,19 @@<turbo-frame id="modal"></turbo-frame><div class="labor-layout-view <%= 'show-content' if @selected_meeting || @new_meeting %> hide-panel"- data-controller="layout-toggle hover-arrows index-page keyboard-navigation viewport column-picker"- <%= tag.attributes(data: meeting_column_picker_data(organisation: @current_organisation, project: @project, active_view: @active_smart_folder, frame_id: 'meetings_results')) %>- data-hover-arrows-layout-toggle-outlet=".labor-layout-view"- data-layout-toggle-list-frame-ids-value="<%= ['meetings_results'].to_json %>"- data-layout-toggle-detail-frame-id-value="meeting_display_frame"- data-layout-toggle-content-selector-value=".meeting-content"- data-layout-toggle-selected-row-selector-value=".selected-row[data-meeting-id]"- data-layout-toggle-selection-params-value="<%= %w[meeting_id].to_json %>"- data-layout-toggle-list-filter-params-value="<%= Meetings::ListState::KEYS.to_json %>"- data-layout-toggle-storage-key-value="layoutState:meetings"- data-layout-toggle-clear-detail-on-close-value="true"- data-viewport-breakpoint-value="1024"- data-index-page-param-name-value="meeting_id"- data-index-page-frame-id-value="meeting_display_frame"- data-index-page-content-selector-value=".meeting-content"- data-index-page-placeholder-id-value="meeting-display-placeholder"- data-index-page-placeholder-class-value="ticket-placeholder px-4"- data-index-page-placeholder-title-value="<%= t('views.organisations.meetings.index.placeholder_title') %>"- data-index-page-placeholder-body-value="<%= t('views.organisations.meetings.index.placeholder_body') %>"- data-index-page-selected-row-selector-value=".selected-row[data-meeting-id]"- data-index-page-skip-if-content-visible-value="true"- data-viewport-current-mode-value="<%= @viewport_mode %>"- data-index-url="<%= organisation_project_meetings_path(@current_organisation, @project) %>"- data-lane-params="<%= lane_params_json(selection: %w[meeting_id], form: %w[new]) %>">+ <%= tag.attributes(data: meeting_list_page_data(index_url: organisation_project_meetings_path(@current_organisation, @project),+ list_frame_id: Organisations::MeetingsController::LIST_FRAME_ID,+ viewport_mode: @viewport_mode, lane_forms: %w[new])+ .merge(meeting_column_picker_data(organisation: @current_organisation, project: @project, active_view: @active_smart_folder,+ frame_id: Organisations::MeetingsController::LIST_FRAME_ID))) %>>+ <% list = capture do %>+ <%= render 'organisations/meetings/list_head' %>+ <%= render 'organisations/meetings/meetings_results', meetings: @meetings, selected_meeting: @selected_meeting %>+ <% end %><% if @viewport_mode == 'mobile' %>- <%= render 'organisations/meetings/index_mobile' %>+ <%= render 'organisations/meetings/index_mobile', list: list %><% else %>- <%= render 'organisations/meetings/index_desktop' %>+ <%= render 'organisations/meetings/index_desktop', list: list %><% end %></div>diff --git a/app/views/organisations/meetings_overview/_index_desktop.html.erb b/app/views/organisations/meetings_overview/_index_desktop.html.erbdeleted file mode 100644index e60388f..0000000--- a/app/views/organisations/meetings_overview/_index_desktop.html.erb+++ /dev/null@@ -1,21 +0,0 @@-<%# locals: () %>-<%# The project page's grid (meetings/_index_desktop): the list with its head,- and the column picker in the side panel. The lane stays empty and shut- until PR 3 of meetings_uebersicht_vereinheitlichen_plan.md opens a meeting- in it; a row opens the meeting on its project's page meanwhile. %>-<%= render NeoTwoColumnGridComponent.new(- context_type: :meetings,- css_classes: 'hide-content hide-panel',- additional_targets: { 'column-picker-target' => 'grid' },- chrome_height: NeoTwoColumnGridComponent::LANE_CHROME_HEIGHT_PX,- lane: true-) do |grid| %>- <% grid.with_list do %>- <%= render 'organisations/meetings_overview/list_head' %>- <%= render 'organisations/meetings_overview/results', meetings: @meetings, first_use: meetings_overview_first_use? %>- <% end %>-- <% grid.with_side_panel do %>- <%= render 'organisations/meetings/column_picker' %>- <% end %>-<% end %>diff --git a/app/views/organisations/meetings_overview/_index_mobile.html.erb b/app/views/organisations/meetings_overview/_index_mobile.html.erbdeleted file mode 100644index ed7cbf5..0000000--- a/app/views/organisations/meetings_overview/_index_mobile.html.erb+++ /dev/null@@ -1,17 +0,0 @@-<%# locals: () %>-<%# Phone: the project page's list (meetings/_index_mobile) with its picker,- which floats over the list (views.css, .meeting-mobile-grid). No detail- yet: a row opens the meeting on its project's page. %>-<div class="meeting-mobile-grid list" data-column-picker-target="grid">- <%= render NeoMobileTicketViewComponent.new(- back_url: organisation_meetings_path(@current_organisation),- back_label: t('views.organisations.meetings.index.mobile_list_view')- ) do |mobile| %>- <% mobile.with_list do %>- <%= render 'organisations/meetings_overview/list_head' %>- <%= render 'organisations/meetings_overview/results', meetings: @meetings, first_use: meetings_overview_first_use? %>- <% end %>- <% end %>-- <%= render 'organisations/meetings/column_picker' %>-</div>diff --git a/app/views/organisations/meetings_overview/_new_meeting_modal.html.erb b/app/views/organisations/meetings_overview/_new_meeting_modal.html.erbindex b2c4d95..8c7172f 100644--- a/app/views/organisations/meetings_overview/_new_meeting_modal.html.erb+++ b/app/views/organisations/meetings_overview/_new_meeting_modal.html.erb@@ -12,7 +12,8 @@sort or a page reload only that frame, never this modal). No route is assembledin JavaScript, only the list's own query is added. Its conditions travel asfilter[...], so the overview's filter[project][] does not collide with the- nested route's own project_id. %>+ nested route's own project_id. list_context=organisation says which list a+ save redraws (MeetingList, the same parameter the lane carries). %><div data-controller="meeting-modal"data-meeting-modal-list-frame-value="<%= Organisations::MeetingsController::OVERVIEW_LIST_FRAME_ID %>"data-action="keydown@window->meeting-modal#closeOnEscape keydown@window->meeting-modal#trapFocus">@@ -66,7 +67,8 @@<option value=""><%= t('views.organisations.meetings_overview.index.modal_project_prompt') %></option><% projects.each do |project| %><option value="<%= project.id %>"- data-new-url="<%= new_organisation_project_meeting_path(@current_organisation, project, frame: 'modal') %>"><%= project.name %></option>+ data-new-url="<%= new_organisation_project_meeting_path(@current_organisation, project, frame: 'modal',+ **Meetings::ListState.context_query(organisation: true)) %>"><%= project.name %></option><% end %></select></div>diff --git a/app/views/organisations/meetings_overview/_results.html.erb b/app/views/organisations/meetings_overview/_results.html.erbindex de0df62..a802008 100644--- a/app/views/organisations/meetings_overview/_results.html.erb+++ b/app/views/organisations/meetings_overview/_results.html.erb@@ -1,18 +1,18 @@-<%# locals: (meetings:, first_use: false) %>+<%# locals: (meetings:, selected_meeting: nil, first_use: false) %><%# The meetings_overview_results frame, brought by this partial ITSELF: the- filter bar, the column heads and the pages reload it, and- MeetingsController#create REPLACES it after a save from the overview modal. A- partial without the frame would leave a plain <div> behind, and from then on- every reload would target a frame that no longer exists.+ filter bar, the column heads and the pages reload it, and MeetingsController+ REPLACES it after a save from the overview modal or from the lane+ (list_stream). A partial without the frame would leave a plain <div> behind,+ and from then on every reload would target a frame that no longer exists.Rendered from two controllers, so it reads no helper only one of them has:- first_use is a local (false after a save, there is a meeting then).+ first_use and selected_meeting (the row the lane shows) are locals.data-list-filter-query is the list state as the server applied it; themodal's "+" reads it when a project is chosen (meeting_modal_controller), sothe list after a save keeps its conditions, view, search and sort. %><% frame_id = Organisations::MeetingsController::OVERVIEW_LIST_FRAME_ID %><% base_path = organisation_meetings_path(@current_organisation) %>-<turbo-frame id="<%= frame_id %>">+<turbo-frame id="<%= frame_id %>" data-keyboard-navigation-target="listContainer"><%# One query, not two: .empty? on an unloaded relation asks the database, thenthe loop asks it again. %><% rows = meetings.to_a %>@@ -37,10 +37,10 @@<% else %><%# The project page's table (meetings/_meetings_table): the columns of thepicker, folded by rank, pinned values under the title; on a phone- all of them stand under the title. A row opens the meeting on its- project's page until this list has a lane of its own. %>- <%= render 'organisations/meetings/meetings_table', meetings: rows, selected_meeting: nil,- base_path: base_path, frame_id: frame_id, opens_in_lane: false %>+ all of them stand under the title. A row opens the meeting in the+ lane beside the list. %>+ <%= render 'organisations/meetings/meetings_table', meetings: rows, selected_meeting: selected_meeting,+ base_path: base_path, frame_id: frame_id %><% end %><% if @pagy.count.positive? %><%= render 'shared/pagination_nav_compact', pagy: @pagy, frame_id: frame_id, items_per_page: @pagy.limit,diff --git a/app/views/organisations/meetings_overview/index.html.erb b/app/views/organisations/meetings_overview/index.html.erbindex c4048a1..4fee2a9 100644--- a/app/views/organisations/meetings_overview/index.html.erb+++ b/app/views/organisations/meetings_overview/index.html.erb@@ -1,19 +1,17 @@<%# Org-wide meetings index ("Alle Meetings", Gespräche Slice 1c): "allconversations with person X" across project boundaries. Since 17.10.2026 the- same list as the project meetings page: the shared filter bar above a list- frame that the bar, the column heads and the pages reload. A row opens the- meeting in its own project's master-detail (the lane here comes with PR 3 of- doc/meetings_uebersicht_vereinheitlichen_plan.md).+ same page as the project meetings page+ (doc/meetings_uebersicht_vereinheitlichen_plan.md): the shared filter bar+ above a list frame that the bar, the column heads and the pages reload+ (PR 1), the column picker (PR 2), and a row opens the meeting in the lane+ beside the list (PR 3). The wrapper and the grid are the project page's+ (meeting_list_page_data, meetings/_index_desktop and _index_mobile), with+ this page's list in them.- index-page restores the list on Back and Forward: the bar pushes history- entries of its own ({ lane: true }), which Turbo leaves alone. list-address- writes the list the frame rendered (sort, page, view) into the address after- every frame load, which the bar reads from window.location. viewport reloads- the page below the breakpoint with ?viewport=mobile, as on the project- page. column-picker is the project page's picker (PR 2 of the plan): it- saves into the open view or into the base view of this list, and reloads- the list frame. The grid around the list is the project page's too, with- the picker in its side panel and an empty lane until PR 3 fills it. %>+ The detail in the lane is project-nested (MeetingsController) and carries+ list_context=organisation, so a save there redraws THIS list. layout-toggle+ is the one writer of the address, as on the project page: the list state+ after every list reload or stream, the lane part from the row and the ✕. %><% content_for :head do %><meta name="turbo-cache-control" content="no-cache"><% end %>@@ -21,19 +19,21 @@<%# The expert filter of the bar's view menu opens into this frame. %><turbo-frame id="modal"></turbo-frame>-<div class="w-full"- data-controller="index-page viewport list-address column-picker"- <%= tag.attributes(data: meeting_column_picker_data(organisation: @current_organisation, project: nil, active_view: @active_smart_folder,- frame_id: Organisations::MeetingsOverviewController::LIST_FRAME_ID)) %>- data-list-address-frame-value="<%= Organisations::MeetingsOverviewController::LIST_FRAME_ID %>"- data-list-address-path-value="<%= organisation_meetings_path(@current_organisation) %>"- data-index-page-param-name-value="meeting_id"- data-index-page-frame-id-value="meeting_display_frame"- data-lane-params="<%= lane_params_json(selection: %w[meeting_id]) %>"- data-viewport-current-mode-value="<%= @viewport_mode %>">+<div class="labor-layout-view <%= 'show-content' if @selected_meeting %> hide-panel"+ <%= tag.attributes(data: meeting_list_page_data(index_url: organisation_meetings_path(@current_organisation),+ list_frame_id: Organisations::MeetingsOverviewController::LIST_FRAME_ID,+ viewport_mode: @viewport_mode)+ .merge(meeting_column_picker_data(organisation: @current_organisation, project: nil, active_view: @active_smart_folder,+ frame_id: Organisations::MeetingsOverviewController::LIST_FRAME_ID))) %>>+ <% list = capture do %>+ <%= render 'organisations/meetings_overview/list_head' %>+ <%= render 'organisations/meetings_overview/results', meetings: @meetings, selected_meeting: @selected_meeting,+ first_use: meetings_overview_first_use? %>+ <% end %>+<% if @viewport_mode == 'mobile' %>- <%= render 'organisations/meetings_overview/index_mobile' %>+ <%= render 'organisations/meetings/index_mobile', list: list %><% else %>- <%= render 'organisations/meetings_overview/index_desktop' %>+ <%= render 'organisations/meetings/index_desktop', list: list %><% end %></div>diff --git a/spec/requests/organisations/meetings_overview_create_spec.rb b/spec/requests/organisations/meetings_overview_create_spec.rbindex be03614..3fcebca 100644--- a/spec/requests/organisations/meetings_overview_create_spec.rb+++ b/spec/requests/organisations/meetings_overview_create_spec.rb@@ -106,7 +106,8 @@ RSpec.describe 'Organisations::MeetingsOverview create', type: :request dosign_in writer_aget overview_path, params: { search: 'Kickoff', filter: { project: [project_a.id] } }- expect(new_url_query_for(project_a)).to eq('frame' => 'modal')+ # list_context says which list a save redraws; the list state is not in it.+ expect(new_url_query_for(project_a)).to eq('frame' => 'modal', 'list_context' => 'organisation')modal = Nokogiri::HTML(response.body).at_css('[data-controller="meeting-modal"]')expect(modal['data-meeting-modal-list-frame-value']).to eq('meetings_overview_results')end@@ -125,14 +126,14 @@ RSpec.describe 'Organisations::MeetingsOverview create', type: :request dodescribe 'GET new (frame: modal)' doit 'renders the form inside the modal frame for a writer' dosign_in writer_a- get new_organisation_project_meeting_path(organisation, project_a, frame: 'modal'),+ get new_organisation_project_meeting_path(organisation, project_a, frame: 'modal', list_context: 'organisation'),headers: { 'Turbo-Frame' => 'meeting_modal_form' }expect(response).to have_http_status(:ok)expect(response.body).to include('meeting_modal_form', 'meeting-form-card')# The save must be marked as coming from the overview, or it would answer into# frames this page does not have.- expect(response.body).to include('overview_modal')+ expect(hidden_field_value('list_context')).to eq('organisation')endit 'refuses the form to a reader (the area gate), creating no way in' do@@ -148,14 +149,14 @@ RSpec.describe 'Organisations::MeetingsOverview create', type: :request do# Second link. Asserting the field NAMES only would pass even if the values# were cross-wired or arrived empty, the regression this example is for.sign_in writer_a- get new_organisation_project_meeting_path(organisation, project_a, frame: 'modal', search: 'Kickoff',+ get new_organisation_project_meeting_path(organisation, project_a, frame: 'modal', list_context: 'organisation', search: 'Kickoff',filter: { participant: [anna], project: [project_b.id] }),headers: { 'Turbo-Frame' => 'meeting_modal_form' }expect(hidden_field_value('search')).to eq('Kickoff')expect(hidden_field_value('filter[participant][]')).to eq(anna)expect(hidden_field_value('filter[project][]')).to eq(project_b.id)- expect(hidden_field_value('context')).to eq('overview_modal')+ expect(hidden_field_value('list_context')).to eq('organisation')endit 'falls back to the full page for an unknown frame value instead of half a page' do@@ -172,7 +173,7 @@ RSpec.describe 'Organisations::MeetingsOverview create', type: :request dodescribe 'POST create from the modal' dolet(:valid_params) do- { context: 'overview_modal', meeting: { title: 'Kickoff Alpha', occurred_at: Time.current } }+ { list_context: 'organisation', meeting: { title: 'Kickoff Alpha', occurred_at: Time.current } }endit 'creates the meeting and refreshes the org-wide list' do@@ -207,11 +208,14 @@ RSpec.describe 'Organisations::MeetingsOverview create', type: :request doexpect(response.body).to include('Kickoff 0', 'Kickoff 1')end- it 'does not answer into the project page frames, which do not exist here' do+ it 'does not answer into the project page list, which does not exist here, nor into the lane' dosign_in writer_apost organisation_project_meetings_path(organisation, project_a), params: valid_params, as: :turbo_stream- expect(response.body).not_to include('meeting_display_frame')+ # The rows name the lane they open in (list-row), so the stream targets+ # are asked, not the body: a save from the modal leaves the lane alone.+ expect(response.body).to include('target="meetings_overview_results"')+ expect(response.body).not_to include('target="meeting_display_frame"')expect(response.body).not_to include('target="meetings_results"')end@@ -306,7 +310,7 @@ RSpec.describe 'Organisations::MeetingsOverview create', type: :request doexpect dopost organisation_project_meetings_path(organisation, project_a),- params: { context: 'overview_modal', meeting: { title: '', occurred_at: Time.current } },+ params: { list_context: 'organisation', meeting: { title: '', occurred_at: Time.current } },as: :turbo_streamend.not_to(change { ActsAsTenant.with_tenant(organisation) { Meeting.count } })@@ -332,7 +336,7 @@ RSpec.describe 'Organisations::MeetingsOverview create', type: :request dosign_in writer_apost organisation_project_meetings_path(organisation, project_a),- params: { context: 'overview_modal', meeting: { title: 'Kickoff Alpha', occurred_at: Time.current }, items: 2 },+ params: { list_context: 'organisation', meeting: { title: 'Kickoff Alpha', occurred_at: Time.current }, items: 2 },as: :turbo_streamnext_link = Nokogiri::HTML(response.body).at_css("a[title='#{I18n.t('views.shared.pagination_compact.next_page')}']")@@ -347,7 +351,7 @@ RSpec.describe 'Organisations::MeetingsOverview create', type: :request dosign_in writer_apost organisation_project_meetings_path(organisation, project_a),- params: { context: 'overview_modal', meeting: { title: 'Kickoff Alpha', occurred_at: Time.current } }+ params: { list_context: 'organisation', meeting: { title: 'Kickoff Alpha', occurred_at: Time.current } }expect(response).to redirect_to(organisation_meetings_path(organisation))end@@ -356,7 +360,7 @@ RSpec.describe 'Organisations::MeetingsOverview create', type: :request dosign_in writer_apost organisation_project_meetings_path(organisation, project_a),- params: { context: 'overview_modal', meeting: { title: 'Kickoff Alpha', occurred_at: Time.current },+ params: { list_context: 'organisation', meeting: { title: 'Kickoff Alpha', occurred_at: Time.current },filter: { project: [project_a.id] }, sort: { column: 'title', direction: 'asc' } }expect(URI.parse(response.location).path).to eq(overview_path)@@ -368,7 +372,7 @@ RSpec.describe 'Organisations::MeetingsOverview create', type: :request dosign_in writer_apost organisation_project_meetings_path(organisation, project_a),- params: { context: 'overview_modal', meeting: { title: '', occurred_at: Time.current } }+ params: { list_context: 'organisation', meeting: { title: '', occurred_at: Time.current } }expect(response).to have_http_status(:unprocessable_content)expect(response.body).to include('meeting_modal_form', 'meeting-form-card')diff --git a/spec/requests/organisations/meetings_overview_lane_access_spec.rb b/spec/requests/organisations/meetings_overview_lane_access_spec.rbnew file mode 100644index 0000000..70aad1c--- /dev/null+++ b/spec/requests/organisations/meetings_overview_lane_access_spec.rb@@ -0,0 +1,188 @@+# frozen_string_literal: true++require 'rails_helper'++# "Alle Meetings" with the lane: what the lane may reveal+# (doc/meetings_uebersicht_vereinheitlichen_plan.md, PR 3). A meeting_id from+# the address resolves through policy_scope(Meeting) only, the detail stays+# behind the project's own gates, and list_context chooses which list a save+# redraws, never what anyone may read or write.+#+# Every negative assertion first proves the page rendered with the thing it is+# about (the list, a row), so a redirect or a 404 cannot pass it in a vacuum.+RSpec.describe 'Organisations::MeetingsOverview lane access', :ci_guard, type: :request do+ before { Prosopite.pause } # several requests and setup writes per example+ after { Prosopite.resume }++ let(:organisation) { create(:organisation) }+ let(:project_a) { ActsAsTenant.with_tenant(organisation) { create(:project, organisation: organisation, name: 'Projekt Alpha') } }+ let(:project_b) { ActsAsTenant.with_tenant(organisation) { create(:project, organisation: organisation, name: 'Projekt Beta') } }+ let(:overview_path) { organisation_meetings_path(organisation) }++ def member_with(levels)+ user = create(:user)+ ActsAsTenant.with_tenant(organisation) do+ role = create(:role, title: "Role #{SecureRandom.hex(4)}", organisation: organisation)+ create(:membership, user: user, organisation: organisation, role: role, active: true)+ levels.each { |project, level| create(:project_permission, user: user, project: project, meetings_access: level) }+ end+ user+ end++ def create_meeting(org:, project:, title:)+ ActsAsTenant.with_tenant(org) { create(:meeting, project: project, organisation: org, title: title) }+ end++ def page_body = Capybara.string(response.body)++ def row_titles+ page_body.all('#meetings_overview_results tr[data-meeting-id] h5').map { |title| title.text.strip }+ end++ let(:reader_a) { member_with(project_a => 'read_only') }+ let!(:alpha) { create_meeting(org: organisation, project: project_a, title: 'Alpha Kickoff') }+ let!(:beta) { create_meeting(org: organisation, project: project_b, title: 'Beta Geheim') }++ describe 'opening by address (?meeting_id=)' do+ before { sign_in reader_a }++ it 'opens a readable meeting (the positive control)' do+ get overview_path, params: { meeting_id: alpha.id }++ expect(page_body).to have_css('#meeting_display_frame h2', text: 'Alpha Kickoff')+ end++ it 'opens nothing for a meeting in a project the reader may not read' do+ get overview_path, params: { meeting_id: beta.id }++ expect(response).to have_http_status(:ok)+ expect(row_titles).to eq(['Alpha Kickoff'])+ expect(page_body).to have_css('turbo-frame#meeting_display_frame')+ expect(page_body).to have_no_css('#meeting_display_frame h2')+ expect(page_body).to have_no_css('.labor-layout-view.show-content')+ expect(response.body).not_to include('Beta Geheim')+ end++ it 'opens nothing for a meeting of another organisation' do+ other = create(:organisation)+ other_project = ActsAsTenant.with_tenant(other) { create(:project, organisation: other) }+ foreign = create_meeting(org: other, project: other_project, title: 'Fremd Vertraulich')++ get overview_path, params: { meeting_id: foreign.id }++ expect(response).to have_http_status(:ok)+ expect(row_titles).to eq(['Alpha Kickoff'])+ expect(page_body).to have_no_css('#meeting_display_frame h2')+ expect(response.body).not_to include('Fremd Vertraulich')+ end++ it 'opens nothing for an unknown id or one that is not a string' do+ get overview_path, params: { meeting_id: SecureRandom.uuid }++ expect(response).to have_http_status(:ok)+ expect(row_titles).to eq(['Alpha Kickoff'])+ expect(page_body).to have_no_css('#meeting_display_frame h2')++ get "#{overview_path}?meeting_id[]=#{alpha.id}"++ expect(response).to have_http_status(:ok)+ expect(row_titles).to eq(['Alpha Kickoff'])+ expect(page_body).to have_no_css('#meeting_display_frame h2')+ end+ end++ describe 'the detail address a row loads (frame: content)' do+ before { sign_in reader_a }++ it 'renders a readable meeting (the positive control)' do+ get organisation_project_meeting_path(organisation, project_a, alpha, frame: 'content', list_context: 'organisation'),+ headers: { 'Turbo-Frame' => 'meeting_display_frame' }++ expect(response).to have_http_status(:ok)+ expect(response.body).to include('Alpha Kickoff')+ end++ it 'refuses a meeting in a project the reader may not read, with the context too' do+ get organisation_project_meeting_path(organisation, project_b, beta, frame: 'content', list_context: 'organisation'),+ headers: { 'Turbo-Frame' => 'meeting_display_frame' }++ expect(response).to have_http_status(:redirect)+ expect(response.body).not_to include('Beta Geheim')+ end++ it 'does not find a meeting through another project the reader may read' do+ get organisation_project_meeting_path(organisation, project_a, beta, frame: 'content', list_context: 'organisation'),+ headers: { 'Turbo-Frame' => 'meeting_display_frame' }++ expect(response).to have_http_status(:not_found)+ end+ end++ describe 'a save from the lane without the right to write' do+ def update_alpha(**context)+ patch organisation_project_meeting_path(organisation, project_a, alpha, format: :turbo_stream),+ params: { meeting: { title: 'Überschrieben' }, frame_id: 'meeting_display_frame' }.merge(context)+ end++ it 'is refused exactly as without the context, and changes nothing' do+ sign_in reader_a++ update_alpha+ without_context = [response.status, response.location]+ update_alpha(list_context: 'organisation')++ expect(without_context.first).to eq(302)+ expect([response.status, response.location]).to eq(without_context)+ expect(response.body).not_to include('meetings_overview_results')+ expect(alpha.reload.title).to eq('Alpha Kickoff')+ end++ it 'refuses a delete and a search release flip with the context too' do+ sign_in reader_a++ delete organisation_project_meeting_path(organisation, project_a, alpha, format: :turbo_stream, list_context: 'organisation')+ expect(response).to have_http_status(:redirect)+ expect(Meeting.unscoped.exists?(alpha.id)).to be(true)++ post toggle_search_organisation_project_meeting_path(organisation, project_a, alpha, format: :turbo_stream),+ params: { create_embeddings: '1', list_context: 'organisation' }+ expect(response.body).not_to include('meetings_overview_results')+ expect(alpha.reload.create_embeddings).to be(false)+ end+ end++ describe 'a forged list_context' do+ let(:writer) { member_with(project_a => 'read_write', project_b => 'read_write') }++ before { sign_in writer }++ ['org', 'Organisation', ' organisation', ['organisation'], { 'search' => 'x' }].each do |forged|+ it "redraws the project list for #{forged.inspect}" do+ patch organisation_project_meeting_path(organisation, project_a, alpha, format: :turbo_stream),+ params: { meeting: { title: 'Alpha neu' }, frame_id: 'meeting_display_frame', list_context: forged }++ expect(response).to have_http_status(:ok)+ targets = page_body.all("turbo-stream[action='replace']").map { |stream| stream['target'] }+ expect(targets).to include('meetings_results')+ expect(targets).not_to include('meetings_overview_results')+ # The project list of project A: B's meeting is not in it.+ expect(response.body).not_to include('Beta Geheim')+ end+ end++ it 'never widens the list beyond the readable projects with the real value' do+ reader = member_with(project_a => 'read_write')+ sign_in reader++ patch organisation_project_meeting_path(organisation, project_a, alpha, format: :turbo_stream),+ params: { meeting: { title: 'Alpha neu' }, frame_id: 'meeting_display_frame', list_context: 'organisation' }++ expect(response).to have_http_status(:ok)+ # Capybara does not walk a <template>: the list is read from the raw body.+ list = response.body[%r{<turbo-stream action="replace" target="meetings_overview_results"><template>(.*?)</template>}m, 1]+ titles = Capybara.string(list.to_s).all('tr[data-meeting-id] h5').map { |title| title.text.strip }+ expect(titles).to eq(['Alpha neu'])+ expect(response.body).not_to include('Beta Geheim')+ end+ end+enddiff --git a/spec/requests/organisations/meetings_overview_lane_spec.rb b/spec/requests/organisations/meetings_overview_lane_spec.rbnew file mode 100644index 0000000..f92eabd--- /dev/null+++ b/spec/requests/organisations/meetings_overview_lane_spec.rb@@ -0,0 +1,293 @@+# frozen_string_literal: true++require 'rails_helper'++# "Alle Meetings" with the detail in the lane (doc/meetings_uebersicht_vereinheitlichen_plan.md,+# PR 3): a row opens the meeting beside the list, as on the project page, and a+# save in the lane redraws the list the lane was opened from. The detail and its+# writes stay project-nested (MeetingsController); the lane only says which list+# it belongs to, with list_context=organisation. What the lane may reveal is+# pinned by meetings_overview_lane_access_spec.rb; this file is about behaviour.+RSpec.describe 'Organisations::MeetingsOverview lane', type: :request do+ before { Prosopite.pause } # several requests and setup writes per example+ after { Prosopite.resume }++ let(:organisation) { create(:organisation, ai_enabled: true) }+ let(:project_a) { ActsAsTenant.with_tenant(organisation) { create(:project, organisation: organisation, name: 'Projekt Alpha') } }+ let(:project_b) { ActsAsTenant.with_tenant(organisation) { create(:project, organisation: organisation, name: 'Projekt Beta') } }+ let(:overview_path) { organisation_meetings_path(organisation) }+ let(:user) { create(:user) }++ let!(:alpha) { create_meeting(project: project_a, title: 'Alpha Kickoff', occurred_at: 2.days.ago, participants: ['Anna']) }+ let!(:beta) { create_meeting(project: project_b, title: 'Beta Retro', occurred_at: 1.day.ago, participants: ['Anna']) }++ before do+ ActsAsTenant.with_tenant(organisation) do+ create(:membership, user: user, organisation: organisation, role: create(:admin_role, organisation: organisation), active: true)+ end+ sign_in user+ end++ def create_meeting(project:, title:, participants: [], **attributes)+ ActsAsTenant.with_tenant(organisation) do+ create(:meeting, project: project, organisation: organisation, creator: user, title: title, **attributes).tap do |meeting|+ participants.each { |name| create(:meeting_participant, meeting: meeting, display_name: name) }+ end+ end+ end++ def page_body = Capybara.string(response.body)++ def overview_titles(doc = page_body)+ doc.all('#meetings_overview_results tr[data-meeting-id] h5').map { |title| title.text.strip }+ end++ # The targets of the response's streams, by action.+ def stream_targets(action)+ page_body.all("turbo-stream[action='#{action}']").map { |stream| stream['target'] }+ end++ # What a stream renders. Capybara does not walk a <template>, so its content+ # is read from the raw body.+ def stream_content(action, target)+ match = response.body.match(%r{<turbo-stream action="#{action}" target="#{target}"><template>(.*?)</template></turbo-stream>}m)+ expect(match).not_to be_nil, "no #{action} stream for #{target}"+ Capybara.string(match[1])+ end++ def streamed_titles(target)+ stream_content('replace', target).all("##{target} tr[data-meeting-id] h5").map { |title| title.text.strip }+ end++ def query_of(href) = Rack::Utils.parse_nested_query(URI(href).query)++ def lane_query = { list_context: 'organisation' }++ describe 'the page' do+ it 'is the project page layout: list, lane and one writer of the address' do+ get overview_path++ wrapper = page_body.find('.labor-layout-view')+ expect(wrapper['data-controller'].split).to include('layout-toggle', 'hover-arrows', 'index-page', 'keyboard-navigation', 'viewport', 'column-picker')+ expect(wrapper['data-controller'].split).not_to include('list-address')+ expect(wrapper['data-index-url']).to eq(overview_path)+ expect(JSON.parse(wrapper['data-layout-toggle-list-frame-ids-value'])).to eq(['meetings_overview_results'])+ expect(wrapper['data-layout-toggle-detail-frame-id-value']).to eq('meeting_display_frame')+ expect(JSON.parse(wrapper['data-layout-toggle-list-filter-params-value'])).to eq(Meetings::ListState::KEYS)+ expect(wrapper['data-viewport-breakpoint-value']).to eq('1024')+ expect(page_body).to have_css('turbo-frame#meeting_display_frame')+ expect(page_body).to have_css("turbo-frame#meetings_overview_results[data-keyboard-navigation-target='listContainer']")+ end++ it 'opens a row in the lane: list-row with the project-nested detail address and the context' do+ get overview_path++ row = page_body.find("tr[data-meeting-id='#{beta.id}']")+ expect(row['data-controller']).to eq('list-row')+ expect(row['data-action']).to eq('click->list-row#click')+ expect(row['data-list-row-frame-value']).to eq('meeting_display_frame')+ expect(row['data-list-row-param-value']).to eq('meeting_id')+ expect(row['data-list-row-url-value'])+ .to eq(organisation_project_meeting_path(organisation, project_b, beta, list_context: 'organisation'))+ expect(page_body).to have_no_css('[data-controller~="clickable-row"]')+ end+ end++ describe 'a full visit with ?meeting_id=' do+ it 'opens the meeting in the lane and keeps meetings of every project in the list' do+ get overview_path, params: { meeting_id: alpha.id, search: 'a' }++ expect(response).to have_http_status(:ok)+ expect(page_body).to have_css('.labor-layout-view.show-content')+ expect(page_body).to have_css('#meeting_display_frame h2', text: 'Alpha Kickoff')+ expect(page_body).to have_css("tr.selected-row[data-meeting-id='#{alpha.id}']")+ # @project of the lane never becomes the list's project.+ expect(overview_titles).to contain_exactly('Alpha Kickoff', 'Beta Retro')+ end++ it 'gives the lane the way back to this list, with its state, and every write the context' do+ get overview_path, params: { meeting_id: alpha.id, search: 'Kick', search_mode: 'title_only' }++ back = page_body.find('#meeting_display_frame [data-lane-back]')['href']+ expect(URI(back).path).to eq(overview_path)+ expect(query_of(back)).to include('search' => 'Kick', 'search_mode' => 'title_only')+ expect(query_of(back)).not_to include('list_context', 'meeting_id')+ # The lane's own routes are its project's (layout_toggle hands them the list state).+ head = page_body.find('#meeting_display_frame [data-lane-head]')+ expect(head['data-lane-index-url']).to eq(organisation_project_meetings_path(organisation, project_a))+ edit = query_of(page_body.find("#meeting_display_frame a[title='#{I18n.t('views.organisations.meetings.show.edit_meeting')}']", match: :first)['href'])+ expect(edit).to include('list_context' => 'organisation', 'search' => 'Kick', 'search_mode' => 'title_only')+ end++ it 'recovers a stuck ticket suggestion run as the project page does' do+ allow(MeetingTicketSuggestionRun).to receive(:recover_for_meeting!).and_call_original++ get overview_path, params: { meeting_id: alpha.id }++ expect(MeetingTicketSuggestionRun).to have_received(:recover_for_meeting!).with(alpha)+ end++ it 'opens nothing without the parameter' do+ get overview_path++ expect(page_body).to have_css('#meeting_display_frame')+ expect(page_body).to have_no_css('.labor-layout-view.show-content')+ expect(page_body).to have_no_css('#meeting_display_frame h2')+ end+ end++ describe 'the detail loaded into the lane (frame: content)' do+ it 'renders the way back to the overview and carries the context in its links' do+ ActsAsTenant.with_tenant(organisation) { alpha.update!(notes: 'Etwas Inhalt') }+ get organisation_project_meeting_path(organisation, project_a, alpha, frame: 'content', list_context: 'organisation', search: 'Kick'),+ headers: { 'Turbo-Frame' => 'meeting_display_frame' }++ expect(response).to have_http_status(:ok)+ back = page_body.find('[data-lane-back]')['href']+ expect(URI(back).path).to eq(overview_path)+ expect(query_of(back)).to include('search' => 'Kick')+ expect(query_of(back)).not_to include('list_context')+ toggle = page_body.find("form[action='#{toggle_search_organisation_project_meeting_path(organisation, project_a, alpha)}']")+ expect(toggle).to have_css("input[name='list_context'][value='organisation']", visible: :all)+ end++ it 'keeps the project page back link without the context' do+ ActsAsTenant.with_tenant(organisation) { alpha.update!(notes: 'Etwas Inhalt') }+ get organisation_project_meeting_path(organisation, project_a, alpha, frame: 'content', search: 'Kick'),+ headers: { 'Turbo-Frame' => 'meeting_display_frame' }++ back = page_body.find('[data-lane-back]')['href']+ expect(URI(back).path).to eq(organisation_project_meetings_path(organisation, project_a))+ expect(query_of(back)).to include('search' => 'Kick')+ expect(page_body).to have_css("form[action^='#{toggle_search_organisation_project_meeting_path(organisation, project_a, alpha)}']")+ expect(page_body).to have_no_css("input[name='list_context']", visible: :all)+ end++ it 'puts the context into the edit form, its delete and its cancel' do+ get edit_organisation_project_meeting_path(organisation, project_a, alpha, format: :turbo_stream, frame_id: 'meeting_display_frame',+ list_context: 'organisation', search: 'Kick')++ form_doc = stream_content('update', 'meeting_display_frame')+ save = form_doc.find("form[action='#{organisation_project_meeting_path(organisation, project_a, alpha, format: :turbo_stream)}']")+ expect(save).to have_css("input[name='list_context'][value='organisation']", visible: :all)+ expect(save).to have_css("input[name='search'][value='Kick']", visible: :all)+ # The delete button's form sits inside the edit form, which the parser+ # flattens: its action is read from the raw body.+ delete_action = CGI.unescapeHTML(response.body[/<form[^>]*class="button_to"[^>]*action="([^"]+)"/, 1].to_s)+ expect(URI(delete_action).path).to eq(organisation_project_meeting_path(organisation, project_a, alpha))+ expect(query_of(delete_action)).to include('list_context' => 'organisation', 'search' => 'Kick')+ cancel = form_doc.find('a', text: I18n.t('views.organisations.meetings.form.cancel'))+ expect(query_of(cancel['href'])).to include('list_context' => 'organisation', 'frame' => 'content')+ end+ end++ describe 'a save from the lane' do+ def update_alpha(context: lane_query, **list_state)+ patch organisation_project_meeting_path(organisation, project_a, alpha, format: :turbo_stream),+ params: { meeting: { title: 'Alpha Kickoff neu' }, frame_id: 'meeting_display_frame' }.merge(context).merge(list_state)+ end++ it 'redraws the overview list with its filters, not the project list' do+ update_alpha(filter: { participant: ['Anna'] })++ expect(response).to have_http_status(:ok)+ expect(stream_targets('replace')).to include('meetings_overview_results')+ expect(stream_targets('replace')).not_to include('meetings_results')+ expect(streamed_titles('meetings_overview_results')).to contain_exactly('Alpha Kickoff neu', 'Beta Retro')+ list = stream_content('replace', 'meetings_overview_results')+ expect(list).to have_css("tr.selected-row[data-meeting-id='#{alpha.id}']")+ state = Rack::Utils.parse_nested_query(list.find('[data-list-filter-query]')['data-list-filter-query'])+ expect(state).to include('filter' => { 'participant' => ['Anna'] })+ expect(state).not_to have_key('list_context')+ expect(stream_content('update', 'meeting_display_frame')).to have_css('h2', text: 'Alpha Kickoff neu')+ end++ it 'leaves a meeting that no longer matches open in the lane and out of the list' do+ update_alpha(search: 'Beta')++ expect(streamed_titles('meetings_overview_results')).to eq(['Beta Retro'])+ expect(stream_content('update', 'meeting_display_frame')).to have_css('h2', text: 'Alpha Kickoff neu')+ end++ it 'redraws the project list without the context, as before' do+ update_alpha(context: {})++ expect(stream_targets('replace')).to include('meetings_results')+ expect(stream_targets('replace')).not_to include('meetings_overview_results')+ expect(streamed_titles('meetings_results')).to eq(['Alpha Kickoff neu'])+ end++ it 'goes back to the overview without JavaScript' do+ patch organisation_project_meeting_path(organisation, project_a, alpha),+ params: { meeting: { title: 'Alpha neu' }, list_context: 'organisation', search: 'Alpha' }++ expect(response).to redirect_to(organisation_meetings_path(organisation, search: 'Alpha', meeting_id: alpha.id))+ end++ it 'deletes: the overview list loses the meeting and the lane closes' do+ delete organisation_project_meeting_path(organisation, project_a, alpha, format: :turbo_stream, list_context: 'organisation')++ expect(streamed_titles('meetings_overview_results')).to eq(['Beta Retro'])+ expect(stream_targets('replace')).not_to include('meetings_results')+ expect(page_body).to have_css("turbo-stream[action='closeLane']")+ end++ it 'flips the search release and redraws the overview list' do+ ActsAsTenant.with_tenant(organisation) { alpha.update!(notes: 'Etwas Inhalt') }++ post toggle_search_organisation_project_meeting_path(organisation, project_a, alpha, format: :turbo_stream),+ params: { create_embeddings: '1', list_context: 'organisation' }++ expect(response).to have_http_status(:ok)+ expect(stream_targets('replace')).to include('meetings_overview_results', "meeting_#{alpha.id}_search_status")+ expect(stream_targets('replace')).not_to include('meetings_results')+ end++ it 'starts a summary without touching any list, and goes back to the overview without JavaScript' do+ ActsAsTenant.with_tenant(organisation) { alpha.update!(notes: 'Etwas Inhalt') }+ allow_any_instance_of(Organisation).to receive(:ai_available_for?).and_call_original+ allow_any_instance_of(Organisation).to receive(:ai_available_for?).with(:meeting_summary).and_return(+ Lalabase::Llm::FeatureRegistry::Availability.new(available: true, reason: nil)+ )+ allow(Meetings::SummaryJob).to receive(:perform_later)++ post create_summary_organisation_project_meeting_path(organisation, project_a, alpha),+ params: { list_context: 'organisation', search: 'Alpha' }++ expect(response).to redirect_to(organisation_meetings_path(organisation, search: 'Alpha', meeting_id: alpha.id))+ end+ end++ describe 'the context the lane forwards' do+ it 'sends a full page of the project route with the context to the overview' do+ get organisation_project_meetings_path(organisation, project_a, list_context: 'organisation', search: 'Kick', meeting_id: alpha.id)++ expect(response).to redirect_to(organisation_meetings_path(organisation, search: 'Kick', meeting_id: alpha.id))+ end++ it 'sends a full visit of the detail with the context to the overview with the meeting open' do+ get organisation_project_meeting_path(organisation, project_a, alpha, list_context: 'organisation')++ expect(response).to redirect_to(organisation_meetings_path(organisation, meeting_id: alpha.id))+ end+ end++ describe 'on a phone' do+ it 'shows the meeting full width with the way back to the overview and its filters' do+ get overview_path, params: { meeting_id: alpha.id, viewport: 'mobile', search: 'Kick' }++ expect(response).to have_http_status(:ok)+ expect(page_body).to have_css('#meeting_display_frame h2', text: 'Alpha Kickoff')+ back = page_body.find('.mobile-ticket-view a', text: I18n.t('views.organisations.meetings.index.mobile_list_view'), match: :first)+ expect(back['href']).to eq(organisation_meetings_path(organisation, viewport: 'mobile', search: 'Kick'))+ expect(page_body).to have_no_css('#meetings_overview_results tr[data-meeting-id]')+ end++ it 'shows the list with rows that open in the lane' do+ get overview_path, params: { viewport: 'mobile' }++ expect(overview_titles).to contain_exactly('Alpha Kickoff', 'Beta Retro')+ expect(page_body.find("tr[data-meeting-id='#{alpha.id}']")['data-controller']).to eq('list-row')+ end+ end+enddiff --git a/spec/requests/organisations/meetings_overview_spec.rb b/spec/requests/organisations/meetings_overview_spec.rbindex 6a5d481..8515e8b 100644--- a/spec/requests/organisations/meetings_overview_spec.rb+++ b/spec/requests/organisations/meetings_overview_spec.rb@@ -256,13 +256,18 @@ RSpec.describe 'Organisations::MeetingsOverview', type: :request doexpect(query).not_to have_key('utm_source')end+ # One writer of the address, the project page's (PR 3): layout-toggle+ # copies the list state the frame rendered into the address after every+ # reload and stream. list-address, the writer of PR 1, is gone.it 'lets the address follow the list frame, so the bar reads sort and page from it' docreate_meeting(project: project_a, title: 'Alpha Kickoff')page = list- wrapper = page.find('[data-controller~="list-address"]')- expect(wrapper['data-list-address-frame-value']).to eq('meetings_overview_results')- expect(wrapper['data-list-address-path-value']).to eq(overview_path)+ wrapper = page.find('[data-controller~="layout-toggle"]')+ expect(JSON.parse(wrapper['data-layout-toggle-list-frame-ids-value'])).to eq(['meetings_overview_results'])+ expect(JSON.parse(wrapper['data-layout-toggle-list-filter-params-value'])).to eq(Meetings::ListState::KEYS)+ expect(wrapper['data-index-url']).to eq(overview_path)+ expect(page).to have_no_css('[data-controller~="list-address"]')endit 'answers the list frame alone' do@@ -300,13 +305,16 @@ RSpec.describe 'Organisations::MeetingsOverview', type: :request doenddescribe 'row navigation' do- it 'opens a row in the project master-detail with the meeting selected' do+ # Since PR 3 the row opens the meeting in the lane of this page+ # (meetings_overview_lane_spec.rb), no longer on its project's page.+ it 'opens a row in the lane of this page, through the detail of its project' domeeting = create_meeting(project: project_a, title: 'Alpha Kickoff')sign_in readerpage = listrow = page.find("#meetings_overview_results tr[data-meeting-id='#{meeting.id}']")- expect(row['data-clickable-row-url-value']).to eq(organisation_project_meetings_path(organisation, project_a, meeting_id: meeting.id))+ expect(row['data-list-row-url-value']).to eq(organisation_project_meeting_path(organisation, project_a, meeting, list_context: 'organisation'))+ expect(row['data-list-row-frame-value']).to eq('meeting_display_frame')endenddiff --git a/spec/system/meetings_overview_spec.rb b/spec/system/meetings_overview_spec.rbindex a042fef..d58ad66 100644--- a/spec/system/meetings_overview_spec.rb+++ b/spec/system/meetings_overview_spec.rb@@ -3,11 +3,13 @@require 'rails_helper'# "Alle Meetings" in the browser (doc/meetings_uebersicht_vereinheitlichen_plan.md,-# PR 1 and 2): the shared filter bar with the condition "Projekt", a view saved+# PR 1 to 3): the shared filter bar with the condition "Projekt", a view saved# on this page and opened again, the "+" modal, whose save must leave the list-# with the conditions it had, and the column picker. The request specs cannot-# see these: the modal reads the list state from the list frame in JavaScript,-# and the picker saves and reloads the frame from the browser.+# with the conditions it had, the column picker, and the meeting in the lane,+# whose saves redraw this list. The request specs cannot see these: the modal+# reads the list state from the list frame in JavaScript, the picker saves and+# reloads the frame from the browser, and the lane is opened, closed and+# restored by the row opener, the ✕ and Back.RSpec.describe 'Meetings overview', type: :system dobefore { Prosopite.pause }after do@@ -168,4 +170,143 @@ RSpec.describe 'Meetings overview', type: :system do)expect(list_overflow).to be <= 0end++ describe 'the lane' do+ let(:overview_rows) { '#meetings_overview_results tr[data-meeting-id]' }++ def meeting(title) = Meeting.unscoped.find_by!(title: title)++ def row_of(title) = find(overview_rows, text: title)++ def lane_title = find('#meeting_display_frame h2', wait: 5)++ before do+ ActsAsTenant.with_tenant(organisation) do+ ['Alpha Kickoff', 'Beta Retro'].each do |title|+ create(:meeting_participant, meeting: Meeting.find_by!(title: title), display_name: 'Anna')+ end+ create(:meeting, project: alpha, organisation: organisation, creator: user, title: 'Alpha Ohne Anna', occurred_at: 3.days.ago)+ end+ end++ it 'opens a row beside the list, saves in it and keeps the list with its condition' do+ page.driver.browser.manage.window.resize_to(1440, 1000)+ visit organisation_meetings_path(organisation, filter: { participant: ['Anna'] })+ expect_titles('Alpha Kickoff', 'Beta Retro')++ row_of('Beta Retro').click+ expect(lane_title).to have_text('Beta Retro')+ expect(page).to have_css("#{overview_rows}.selected-row", text: 'Beta Retro')+ expect(page).to have_current_path(/meeting_id=#{meeting('Beta Retro').id}/)+ expect(page).to have_current_path(/filter%5Bparticipant%5D/)++ within('#meeting_display_frame') { find("a[title='#{I18n.t('views.organisations.meetings.show.edit_meeting')}']", match: :first).click }+ within('#meeting_display_frame') do+ fill_in 'meeting[title]', with: 'Beta Retro neu'+ click_button I18n.t('views.organisations.meetings.form.save')+ end++ expect(page).to have_css('#meeting_display_frame h2', text: 'Beta Retro neu', wait: 5)+ expect_titles('Alpha Kickoff', 'Beta Retro neu')+ expect(page).to have_css("#{overview_rows}.selected-row", text: 'Beta Retro neu')+ expect(page).to have_current_path(/filter%5Bparticipant%5D/)+ expect(page).to have_current_path(/meeting_id=/)+ end++ it 'keeps a condition set beside the open lane through a save in it' do+ page.driver.browser.manage.window.resize_to(1440, 1000)+ visit organisation_meetings_path(organisation)+ expect_titles('Alpha Kickoff', 'Beta Retro', 'Alpha Ohne Anna')+ row_of('Alpha Kickoff').click+ expect(lane_title).to have_text('Alpha Kickoff')++ find('[data-filter-bar-target="filterButton"]').click+ find('[role="menuitem"][data-category="project"]').click+ within('[data-filter-bar-target="valueMenu"]') { find("input[type='checkbox'][data-filter-value='#{alpha.id}']").click }+ expect_titles('Alpha Kickoff', 'Alpha Ohne Anna')+ # A click beside the menu closes it. Escape would close the lane too while+ # the value menu is open, on the project page as well (not this PR's).+ find('#meeting_display_frame h2').click+ expect(page).to have_css('#meeting_display_frame h2', text: 'Alpha Kickoff')++ within('#meeting_display_frame') { find("a[title='#{I18n.t('views.organisations.meetings.show.edit_meeting')}']", match: :first).click }+ within('#meeting_display_frame') do+ fill_in 'meeting[title]', with: 'Alpha Kickoff neu'+ click_button I18n.t('views.organisations.meetings.form.save')+ end++ expect(page).to have_css('#meeting_display_frame h2', text: 'Alpha Kickoff neu', wait: 5)+ expect_titles('Alpha Kickoff neu', 'Alpha Ohne Anna')+ end++ it 'closes with the ✕, and Back and Forward open and close the lane' do+ page.driver.browser.manage.window.resize_to(1440, 1000)+ visit organisation_meetings_path(organisation, search: 'Alpha')+ expect_titles('Alpha Kickoff', 'Alpha Ohne Anna')++ row_of('Alpha Kickoff').click+ expect(lane_title).to have_text('Alpha Kickoff')+ find('#meeting_display_frame [data-lane-close]').click+ expect(page).to have_no_css('#meeting_display_frame h2', wait: 5)+ expect(page).to have_no_current_path(/meeting_id=/, wait: 5)+ expect(page).to have_current_path(/search=Alpha/)++ page.go_back+ expect(page).to have_css('#meeting_display_frame h2', text: 'Alpha Kickoff', wait: 5)+ expect(page).to have_current_path(/meeting_id=#{meeting('Alpha Kickoff').id}/)+ page.go_back+ expect(page).to have_no_css('#meeting_display_frame h2', wait: 5)+ expect(page).to have_no_current_path(/meeting_id=/)+ page.go_forward+ expect(page).to have_css('#meeting_display_frame h2', text: 'Alpha Kickoff', wait: 5)+ expect_titles('Alpha Kickoff', 'Alpha Ohne Anna')+ end++ it 'deletes from the lane: the lane closes and the meeting leaves the list' do+ page.driver.browser.manage.window.resize_to(1440, 1000)+ visit organisation_meetings_path(organisation, meeting_id: meeting('Beta Retro').id)+ expect(lane_title).to have_text('Beta Retro')++ within('#meeting_display_frame') { find("a[title='#{I18n.t('views.organisations.meetings.show.edit_meeting')}']", match: :first).click }+ accept_confirm { within('#meeting_display_frame') { click_button I18n.t('views.organisations.meetings.form.delete') } }++ expect_titles('Alpha Kickoff', 'Alpha Ohne Anna')+ expect(page).to have_no_css('#meeting_display_frame h2', wait: 5)+ expect(page).to have_no_current_path(/meeting_id=/, wait: 5)+ expect(page).to have_no_css('.labor-layout-view.show-content')+ end++ it 'opens a row from the keyboard' do+ page.driver.browser.manage.window.resize_to(1440, 1000)+ visit organisation_meetings_path(organisation)+ expect_titles('Alpha Kickoff', 'Beta Retro', 'Alpha Ohne Anna')++ # A click opens and focuses the first row. The first arrow lands on the+ # first row (as on the project page), the second on the next; Enter opens.+ row_of('Beta Retro').click+ expect(page).to have_css('#meeting_display_frame h2', text: 'Beta Retro', wait: 5)+ page.send_keys(:arrow_down)+ page.send_keys(:arrow_down)+ page.send_keys(:enter)+ expect(page).to have_css('#meeting_display_frame h2', text: 'Alpha Kickoff', wait: 5)+ expect(page).to have_css("#{overview_rows}.selected-row", text: 'Alpha Kickoff')+ end++ it 'opens the meeting full width on a phone and leads back to the list with its search' do+ page.driver.browser.manage.window.resize_to(390, 844)+ visit organisation_meetings_path(organisation, search: 'Alpha')+ expect(page).to have_css(overview_rows, count: 2, wait: 10)++ row_of('Alpha Kickoff').click+ expect(page).to have_css('#meeting_display_frame h2', text: 'Alpha Kickoff', wait: 10)+ expect(page).to have_no_css(overview_rows)+ overflow = page.evaluate_script('document.documentElement.scrollWidth - document.documentElement.clientWidth')+ expect(overflow).to be <= 0++ find('.mobile-ticket-view a', text: I18n.t('views.organisations.meetings.index.mobile_list_view'), match: :first).click+ expect(page).to have_css(overview_rows, count: 2, wait: 10)+ expect(page).to have_current_path(/search=Alpha/)+ expect(page).to have_no_current_path(/meeting_id=/)+ end+ endend