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
Delete the "+" modal of "Alle Meetings" and name a new modal reference
Guido Boyke9f5a523b4439
diff --git a/app/controllers/concerns/CLAUDE.md b/app/controllers/concerns/CLAUDE.mdindex 9aed003..b2bfc21 100644--- a/app/controllers/concerns/CLAUDE.md+++ b/app/controllers/concerns/CLAUDE.md@@ -75,8 +75,11 @@ Server schreibt ihn in die Links und Formulare, die er für eine Anfrage MIT Kon(`meeting_lane_state`), und `layout-toggle` hängt ihn bei Klick und Absenden an jede Anfrageder Bahn (`laneContext`, aus `meeting_list_page_data`). Das Zweite fängt, was ohne Kontextgerendert wurde: Broadcasts, Abschnitts-Aktualisierungen, Controller-Ersetzungen. `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+ist die EINE Frage „welche Liste?“ für Stream, Weiterleitung und Rückweg (das frühere+`context=overview_modal` ist darin aufgegangen). Seit PR 4 öffnet auch das „+“ der Übersicht in+der Bahn: `?new=meeting` auf ihrer eigenen Adresse liefert eine Projektauswahl+(`meetings_overview/_new_meeting_lane`), darunter lädt ein eigener Frame das Formular des+gewählten Projekts aus `MeetingsController#new`; eine Meeting-Route ohne Projekt gibt es nicht. Der Kontext wählt nur dieListe, die Rechte bleiben die des Projekts (`set_meeting`, Bereichs-Tor). EineMeeting-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.diff --git a/app/controllers/concerns/meeting_list.rb b/app/controllers/concerns/meeting_list.rbindex 0625176..1e23da3 100644--- a/app/controllers/concerns/meeting_list.rb+++ b/app/controllers/concerns/meeting_list.rb@@ -10,11 +10,11 @@# "Alle Meetings" Organisations::MeetingsOverviewController, and# MeetingsController for a request with# list_context=organisation (Meetings::ListState):-# a save in the lane or the modal of that page nil+# a save in the lane 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).+# "+" of "Alle Meetings" 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).diff --git a/app/javascript/controllers/CLAUDE.md b/app/javascript/controllers/CLAUDE.mdindex 08a3c11..ee36b43 100644--- a/app/javascript/controllers/CLAUDE.md+++ b/app/javascript/controllers/CLAUDE.md@@ -16,9 +16,11 @@ Konventionen:siehe Root-`CLAUDE.md`, „Critical Bug Fixes".* Guard: `spec/architecture/stimulus_controller_wiring_spec.rb` (kein Mount ohne Controller-Datei).* Modals: IMMER zuerst `docs/dokumentation/modal_pattern.md` und `README_MODAL_PATTERN.md`- (hier im Ordner) lesen. Referenz-Implementierung ist `meeting_modal_controller.js`- (`time_session_modal_controller.js` ist seit 16.09.2026 gelöscht).- `ticket_relation_modal` ist die Variante OHNE gemeinsamen Scope: das Modal ist der Inhalt eines+ (hier im Ordner) lesen. Referenz-Implementierung ist `ticket_relation_modal_controller.js`+ (Fokusfalle über `dialog_a11y`, Schließen über Hintergrund und Escape, Fokus zurück an den+ Auslöser). `meeting_modal_controller.js` ist seit 17.10.2026 gelöscht („Neues Meeting“ auf+ „Alle Meetings“ öffnet in der Bahn), `time_session_modal_controller.js` seit 16.09.2026.+ Seine Form hat KEINEN gemeinsamen Scope mit dem Auslöser: das Modal ist der Inhalt einesFrames neben dem Abschnitt, beide Auslöser sind Links mit `data-turbo-frame`, Verbinden heißtÖffnen, Schließen leert den Frame. Jede Öffnung trägt eine eigene ID (Token): Ablehnung undSpeichern treffen nur sie, eine späte Antwort an ein geschlossenes Modal findet nichts. Dasdiff --git a/app/javascript/controllers/README_MODAL_PATTERN.md b/app/javascript/controllers/README_MODAL_PATTERN.mdindex 6c0749b..743d4ad 100644--- a/app/javascript/controllers/README_MODAL_PATTERN.md+++ b/app/javascript/controllers/README_MODAL_PATTERN.md@@ -4,7 +4,7 @@Diese Dokumentation beschreibt das Modal-Pattern, das für TimeSession entwickelt wurde und als Vorlage für andere Modals in der Anwendung dienen soll.-Referenz-Implementierung ist `meeting_modal_controller.js` („Neues Meeting“ in der Meetings-Übersicht der Organisation). Bis zum 16.09.2026 war es `time_session_modal_controller.js`; er wurde zusammen mit dem Zeit-Knopf im Meetings-Kopf gelöscht, seiner letzten Einbindung.+Referenz-Implementierung ist `ticket_relation_modal_controller.js` (das Modal „Verknüpfen“ eines Tickets): Fokusfalle über `dialog_a11y`, Schließen über Hintergrund und Escape, Rückgabe des Fokus an den Auslöser. Bis zum 17.10.2026 war es `meeting_modal_controller.js`; er wurde gelöscht, weil „Neues Meeting“ auf „Alle Meetings“ seitdem in der Bahn öffnet. Bis zum 16.09.2026 war es `time_session_modal_controller.js`; er wurde zusammen mit dem Zeit-Knopf im Meetings-Kopf gelöscht, seiner letzten Einbindung.## Design-Philosophie@@ -17,7 +17,7 @@ Referenz-Implementierung ist `meeting_modal_controller.js` („Neues Meeting“### Schritt 1: Controller erstellen-Kopieren Sie `meeting_modal_controller.js` und passen Sie an:+Kopieren Sie `ticket_relation_modal_controller.js` und passen Sie an:```javascript// beispiel_modal_controller.js@@ -116,7 +116,7 @@ Verwenden Sie spezifische Klassen für Fehler-Container:### 3. Stimulus Controller NamingFolgen Sie der Konvention: `[resource]-modal`:-- `meeting-modal`+- `ticket-relation-modal`- `ticket-modal`- `note-modal`diff --git a/app/javascript/controllers/layout_toggle_controller.js b/app/javascript/controllers/layout_toggle_controller.jsindex f3c0090..beb5962 100644--- a/app/javascript/controllers/layout_toggle_controller.js+++ b/app/javascript/controllers/layout_toggle_controller.js@@ -179,10 +179,7 @@ export default class extends Controller {'[data-select-layer]:not([hidden])','[data-ticket-bulk-panel-target="pickerMenu"]:not([hidden])',// The "Link" modal is the content of its frame: present only while open.- '[data-controller~="ticket-relation-modal"]',- // The "+" modal of "Alle Meetings" hides with the class and listens on- // window, after this document listener.- '[data-meeting-modal-target="modal"]:not(.hidden)'+ '[data-controller~="ticket-relation-modal"]'].join(', ')))}diff --git a/app/javascript/controllers/meeting_modal_controller.js b/app/javascript/controllers/meeting_modal_controller.jsdeleted file mode 100644index 21aaf03..0000000--- a/app/javascript/controllers/meeting_modal_controller.js+++ /dev/null@@ -1,146 +0,0 @@-import { Controller } from "@hotwired/stimulus"-import { newFormUrl, submissionClosesModal } from "meeting_modal"-import { trapTabKey } from "dialog_a11y"--/**- * Meeting Modal Controller- *- * "Neues Meeting" on the org-wide meetings list. A meeting always belongs to a- * project, so the modal asks for one first and then loads the real form for it.- *- * Every <option> carries its own new-URL from ERB; this controller only copies that- * value onto the frame's src, after adding the state the list shows RIGHT NOW- * (lib/meeting_modal.js). Nothing here knows how a meetings route is spelled, so- * a route change cannot silently break the modal.- *- * Shape and lifecycle follow docs/dokumentation/modal_pattern.md, which names this- * controller its reference implementation; the focus trap is the shared- * lib/dialog_a11y.js the help modal and the drawers already use.- */-export default class extends Controller {- static targets = ["modal", "frame", "projectSelect", "card"]- // listFrame: the id of the overview's list frame. It lives OUTSIDE this- // controller's element (the title box), so it cannot be a Stimulus target; the- // id travels from ERB rather than being hard-coded here.- static values = { listFrame: String }-- connect() {- this.modalTarget.classList.add("hidden")- // The zero state ("choose a project first"), restored on every close.- this.placeholderHTML = this.frameTarget.innerHTML- this.lastFocused = null-- this.handleTurboSuccess = this.handleTurboSuccess.bind(this)- this.handleFrameLoad = this.handleFrameLoad.bind(this)- document.addEventListener("turbo:submit-end", this.handleTurboSuccess)- this.frameTarget.addEventListener("turbo:frame-load", this.handleFrameLoad)- }-- disconnect() {- document.removeEventListener("turbo:submit-end", this.handleTurboSuccess)- this.frameTarget.removeEventListener("turbo:frame-load", this.handleFrameLoad)- // The element can be removed while the modal is open (a stream replacing the- // header, a morph). Leaving the scroll lock behind would freeze the page.- document.body.classList.remove("overflow-hidden")- }-- /**- * A successful save answers with turbo-streams that refresh the list behind the- * modal; closing is left to us. Membership is checked instead of a form id: the id- * is generated by form_with and would tie this controller to that detail.- *- * detail.success alone is NOT enough: fetch follows redirects, so the area gate's- * redirect_to answers 200 and would read as a save that never happened.- */- handleTurboSuccess(event) {- const form = event.target- if (!form || !this.element.contains(form)) return-- if (submissionClosesModal(event.detail)) this.close()- }-- /**- * A frame answer that arrived after we stopped wanting it. Turbo cancels a frame- * fetch only when a NEW visit starts, and removing src starts none, so a load in- * flight when the modal closes still renders into the hidden frame. Without this- * the next open shows a full form for the abandoned project while the select reads- * "Projekt wählen …", and saving would file the meeting under that project.- */- handleFrameLoad() {- if (this.projectSelectTarget.value) return-- this.resetFrame()- }-- open() {- this.lastFocused = document.activeElement- this.modalTarget.classList.remove("hidden")- document.body.classList.add("overflow-hidden")- this.projectSelectTarget.focus()- }-- /** Load the form for the chosen project; back to the zero state when cleared. */- projectChanged() {- const option = this.projectSelectTarget.selectedOptions[0]- const url = newFormUrl(option && option.dataset.newUrl, this.currentListQuery())-- if (!url) {- this.resetFrame()- return- }-- this.frameTarget.setAttribute("src", url)- }-- /**- * The state the list shows at this moment, NOT the one when ERB rendered the- * options: the list frame writes it at every load, the page is never re-rendered- * when a filter, a sort or a page changes.- */- currentListQuery() {- const frame = this.hasListFrameValue ? document.getElementById(this.listFrameValue) : null- const state = frame && frame.querySelector("[data-list-filter-query]")- return state ? state.dataset.listFilterQuery : ""- }-- close() {- this.modalTarget.classList.add("hidden")- document.body.classList.remove("overflow-hidden")-- // A closed modal reopens empty: the next meeting is a new decision, and a- // half-filled form for a project chosen minutes ago is a trap.- this.projectSelectTarget.value = ""- this.resetFrame()-- if (this.lastFocused && typeof this.lastFocused.focus === "function") this.lastFocused.focus()- this.lastFocused = null- }-- resetFrame() {- this.frameTarget.removeAttribute("src")- this.frameTarget.innerHTML = this.placeholderHTML- }-- closeOnBackdrop(event) {- if (event.target === event.currentTarget) {- this.close()- }- }-- closeOnEscape(event) {- if (event.key === "Escape" && this.isOpen) {- this.close()- }- }-- /** Keyboard must not wander into the page behind an aria-modal dialog. */- trapFocus(event) {- if (!this.isOpen) return-- trapTabKey(event, this.cardTarget)- }-- get isOpen() {- return !this.modalTarget.classList.contains("hidden")- }-}diff --git a/app/javascript/controllers/ticket_relation_modal_controller.js b/app/javascript/controllers/ticket_relation_modal_controller.jsindex a6a0b62..5a6b41d 100644--- a/app/javascript/controllers/ticket_relation_modal_controller.js+++ b/app/javascript/controllers/ticket_relation_modal_controller.js@@ -15,8 +15,9 @@ import { trapTabKey } from "dialog_a11y"* is left in the frame, the focus returns to the trigger, found again by its id when a* stream replaced it; a menu entry hands over to its menu button.*- * Shape after docs/dokumentation/modal_pattern.md (reference: meeting_modal_controller.js);- * the focus trap is the shared lib/dialog_a11y.js.+ * The reference implementation of the modal pattern (README_MODAL_PATTERN.md) since+ * 17.10.2026: focus trap through the shared lib/dialog_a11y.js, closing on the backdrop and+ * on Escape, and the focus back to the trigger.*/export default class extends Controller {static targets = ["card", "kind", "delay", "delayField"]diff --git a/app/javascript/lib/meeting_modal.js b/app/javascript/lib/meeting_modal.jsdeleted file mode 100644index 7239fe8..0000000--- a/app/javascript/lib/meeting_modal.js+++ /dev/null@@ -1,60 +0,0 @@-// What: the two decisions meeting_modal_controller.js makes, as pure functions-// so node:test can pin them (spec/system does not run in CI, this path does).-// Why: both were review findings on PR #716, and neither is visible from the-// server side.-//-// 1. newFormUrl adds the list's LIVE state to the option's URL. The modal sits-// in the title box, OUTSIDE the meetings_overview_results frame, and the-// filter bar reloads only that frame. So the page never re-renders, and a-// state ERB baked into every data-new-url would be the one from the first-// page load. The list frame writes its state into data-list-filter-query-// at every load; without it, the list after a save would show something-// other than what the bar says.-// 2. submissionClosesModal decides whether a finished submit really saved.-// Turbo's detail.success is response.ok AFTER fetch followed redirects,-// so the area gate's redirect_to reads as a success. A modal that closes-// on that throws away a pasted transcript and shows no reason.--// Base URL comes from ERB (each <option data-new-url>), so no route is-// assembled here; the list query is added as it stands. The server wrote it-// from its own whitelist (Meetings::ListState), so it names nothing of the-// route. A name the base already carries (frame) is the base's: the list-// state never overrides it.-export function newFormUrl(baseUrl, listQuery = '') {- if (!baseUrl) return null-- // A dummy origin lets URL parse a path-only value; we return path + search,- // so the result stays relative and the origin never leaks into the DOM.- const url = new URL(baseUrl, 'http://meeting-modal.invalid')- const own = new Set(url.searchParams.keys())-- for (const [key, value] of new URLSearchParams(listQuery || '')) {- if (own.has(key)) continue- url.searchParams.append(key, value)- }-- return `${url.pathname}${url.search}`-}--// Turbo exposes the response as fetchResponse.header(name); the raw Response is-// read as a fallback so a shape change does not silently turn every submit into-// a "success".-export function responseContentType(fetchResponse) {- if (!fetchResponse) return ''- if (typeof fetchResponse.header === 'function') return fetchResponse.header('Content-Type') || ''-- const headers = fetchResponse.response && fetchResponse.response.headers- if (headers && typeof headers.get === 'function') return headers.get('Content-Type') || ''-- return ''-}--// Only a turbo-stream answer means the server actually ran the save and-// refreshed the list. A validation error is a 422 (success false, stays open),-// a denied write or an expired session is an HTML page after a redirect-// (success TRUE, but nothing was written -- must NOT close).-export function submissionClosesModal(detail) {- if (!detail || detail.success !== true) return false-- return responseContentType(detail.fetchResponse).includes('turbo-stream')-}diff --git a/app/services/meetings/list_query.rb b/app/services/meetings/list_query.rbindex 2a047a2..3d3ac80 100644--- a/app/services/meetings/list_query.rb+++ b/app/services/meetings/list_query.rb@@ -22,7 +22,7 @@ module Meetingsdirection = sort['direction'].presence || smart_folder&.effective_sort_direction || 'desc'direction = 'desc' unless %w[asc desc].include?(direction)# Ties by the time a meeting was entered: occurred_at has minutes only, and- # the new meeting from the "+" modal belongs at the top, not wherever its+ # a meeting just saved from the "+" belongs at the top, not wherever its# random id puts it. The id makes the order total.query.reorder(column => direction, created_at: direction, id: direction).select(*LIST_COLUMNS).preload(:meeting_participants, :creator)diff --git a/app/views/organisations/meetings_overview/_new_meeting_modal.html.erb b/app/views/organisations/meetings_overview/_new_meeting_modal.html.erbdeleted file mode 100644index 8c7172f..0000000--- a/app/views/organisations/meetings_overview/_new_meeting_modal.html.erb+++ /dev/null@@ -1,91 +0,0 @@-<%# locals: (projects:) %>-<%# "Neues Meeting" on the org-wide list. A meeting always belongs to a project, so- the modal picks one FIRST and only then loads the form for it. The frame below- the select is filled by the project-nested MeetingsController#new (frame:- 'modal') with the SAME partial the project page uses, so participants, the LLM- detection and the search opt-in behave identically -- there is no second copy of- the meeting form.-- Each <option> carries its own new-URL, built here by ERB. meeting_modal_controller- adds the list's CURRENT state to it before setting the frame's src: the state the- list frame wrote into data-list-filter-query at its last load (the filter bar, a- sort or a page reload only that frame, never this modal). No route is assembled- in JavaScript, only the list's own query is added. Its conditions travel as- filter[...], so the overview's filter[project][] does not collide with the- 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">-- <%= render Neo::Buttons::IconButtonComponent.new(- variant: :primary,- icon: 'plus-lg',- size: :medium,- title: t('views.organisations.meetings_overview.index.new_meeting'),- data: { action: 'click->meeting-modal#open' }- ) %>-- <div class="fixed z-modal inset-0 overflow-y-auto hidden"- data-meeting-modal-target="modal">- <%# The click-to-close action sits on the two elements that actually receive the- click. On the container it could never fire: these two cover it completely,- so event.target was never event.currentTarget. %>- <div class="fixed inset-0 bg-ink bg-opacity-60 backdrop-blur-sm"- data-action="click->meeting-modal#closeOnBackdrop"></div>- <div class="flex items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center"- data-action="click->meeting-modal#closeOnBackdrop">- <div class="inline-block align-bottom bg-surface-raised rounded-lg text-left overflow-hidden border border-cream-300 shadow-[4px_4px_0_0_#14110c] transform transition-all sm:my-8 sm:align-middle w-full relative" style="max-width: 720px;"- data-meeting-modal-target="card"- role="dialog"- aria-modal="true"- aria-labelledby="meeting-modal-title">- <div class="bg-surface-raised px-4 pt-5 pb-4 sm:p-6 sm:pb-4 max-h-[85vh] overflow-y-auto">- <div class="flex justify-between items-center mb-4">- <h3 id="meeting-modal-title" class="text-lg leading-6 font-medium text-cream-900">- <%= t('views.organisations.meetings_overview.index.modal_title') %>- </h3>- <%= render Neo::Buttons::IconButtonComponent.new(- variant: :plain,- icon: 'x-lg',- class: 'opacity-50 hover:opacity-100',- title: t('views.organisations.meetings_overview.index.modal_close'),- data: { action: 'click->meeting-modal#close' }- ) %>- </div>-- <%# Outside the frame on purpose: the select must survive every frame load,- because it is the one control that decides what the frame shows. %>- <div class="mb-4">- <label for="meeting-modal-project" class="block text-sm font-medium text-cream-700 mb-1">- <%= t('views.organisations.meetings_overview.index.modal_project_label') %>- </label>- <select id="meeting-modal-project"- data-meeting-modal-target="projectSelect"- data-action="change->meeting-modal#projectChanged"- class="block w-full py-2 px-4 border border-cream-300 rounded-lg bg-surface-raised focus:outline-none focus:border-ink focus:ring-1 focus:ring-ink">- <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',- **Meetings::ListState.context_query(organisation: true)) %>"><%= project.name %></option>- <% end %>- </select>- </div>-- <%# frame-error: a denied write, a deleted project or an expired session- answers this frame with a redirect. Without it Turbo blanks the frame to- its bare "Content missing" and throws; with it the reader gets a message- and a way back. Same wiring as tickets/_tickets_results.html.erb. %>- <turbo-frame id="meeting_modal_form"- data-meeting-modal-target="frame"- data-controller="frame-error">- <p class="py-10 text-center text-sm text-cream-500">- <%= t('views.organisations.meetings_overview.index.modal_select_project_first') %>- </p>- </turbo-frame>- </div>- </div>- </div>- </div>-</div>diff --git a/app/views/organisations/meetings_overview/_results.html.erb b/app/views/organisations/meetings_overview/_results.html.erbindex a802008..b1a260b 100644--- a/app/views/organisations/meetings_overview/_results.html.erb+++ b/app/views/organisations/meetings_overview/_results.html.erb@@ -1,15 +1,15 @@<%# locals: (meetings:, selected_meeting: nil, first_use: false) %><%# The meetings_overview_results frame, brought by this partial ITSELF: thefilter 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,+ REPLACES it after a save in 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 and selected_meeting (the row the lane shows) are locals.- data-list-filter-query is the list state as the server applied it; the- modal's "+" reads it when a project is chosen (meeting_modal_controller), so- the list after a save keeps its conditions, view, search and sort. %>+ data-list-filter-query is the list state as the server applied it;+ layout-toggle writes it into the address after every load of the list, and+ from there the lane's forms take it at submit, so the 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 %>" data-keyboard-navigation-target="listContainer">diff --git a/app/views/organisations/tickets/relations/_modal.html.erb b/app/views/organisations/tickets/relations/_modal.html.erbindex d298797..40e05d7 100644--- a/app/views/organisations/tickets/relations/_modal.html.erb+++ b/app/views/organisations/tickets/relations/_modal.html.erb@@ -6,8 +6,8 @@replaces exactly it, with what was sent and the message, and a save removes it. A lateanswer to a modal closed meanwhile finds no element (review of #944).- Shape and lifecycle after docs/dokumentation/modal_pattern.md (reference:- meeting_modal_controller.js). One autosuggest only (plan, Fassung 3 §2.2b). The other+ Shape and lifecycle after docs/dokumentation/modal_pattern.md; its controller is the+ pattern's reference implementation. One autosuggest only (plan, Fassung 3 §2.2b). The otherticket shown after a refused save came through policy_scope(Ticket), so its title is onethe reader may see. %><% rs = 'views.organisations.tickets.shared.relations.modal' %>diff --git a/config/importmap.rb b/config/importmap.rbindex 625115d..2529fbe 100644--- a/config/importmap.rb+++ b/config/importmap.rb@@ -19,10 +19,6 @@ pin 'meetings/name_normalizer', to: 'lib/meetings/name_normalizer.js'# Meetings Slice 5: pure LLM-detection merge rule, same inject-normalize pattern.pin 'meetings/participant_merge', to: 'lib/meetings/participant_merge.js'pin 'time_session_modal', to: 'lib/time_session_modal.js'-# Overview meeting modal: the list state merge and the "did this really save?"-# predicate, pure so spec/javascript can test them independently of the mobile-# browser regressions that also run in CI.-pin 'meeting_modal', to: 'lib/meeting_modal.js'# The project select of "Neues Meeting" on "Alle Meetings": which form its frame# shows, pure so spec/javascript can test it.pin 'meeting_project_select', to: 'lib/meeting_project_select.js'@@ -180,7 +176,6 @@ elsepin 'controllers/layout_toggle_controller', to: 'controllers/layout_toggle_controller.js'pin 'controllers/list_row_controller', to: 'controllers/list_row_controller.js'pin 'controllers/meeting_analysis_composer_controller', to: 'controllers/meeting_analysis_composer_controller.js'- pin 'controllers/meeting_modal_controller', to: 'controllers/meeting_modal_controller.js'pin 'controllers/meeting_participants_controller', to: 'controllers/meeting_participants_controller.js'pin 'controllers/meeting_project_select_controller', to: 'controllers/meeting_project_select_controller.js'pin 'controllers/meeting_section_sync_controller', to: 'controllers/meeting_section_sync_controller.js'diff --git a/config/locales/views/meetings.de.yml b/config/locales/views/meetings.de.ymlindex c61f238..3f31d5e 100644--- a/config/locales/views/meetings.de.yml+++ b/config/locales/views/meetings.de.yml@@ -194,11 +194,6 @@ de:index:title: Alle Meetingsnew_meeting: Neues Meeting- modal_title: Neues Meeting- modal_close: Schließen- modal_project_label: Projekt- modal_project_prompt: Projekt wählen …- modal_select_project_first: Wähle zuerst ein Projekt.empty_first_time_title: Noch keine Meetingsempty_first_time_description: Sobald in deinen Projekten Meetings erfasst werden, findest du sie hier projektübergreifend — zum Beispiel alle Meetings mit einer bestimmten Person.new_meeting:diff --git a/config/locales/views/meetings.en.yml b/config/locales/views/meetings.en.ymlindex 0abe793..908a606 100644--- a/config/locales/views/meetings.en.yml+++ b/config/locales/views/meetings.en.yml@@ -193,11 +193,6 @@ en:index:title: All Meetingsnew_meeting: New meeting- modal_title: New meeting- modal_close: Close- modal_project_label: Project- modal_project_prompt: Choose a project …- modal_select_project_first: Choose a project first.empty_first_time_title: No meetings yetempty_first_time_description: As soon as meetings are recorded in your projects, you'll find them here across project boundaries — for example every meeting with a particular person.new_meeting:diff --git a/spec/javascript/controllers/layout_toggle_controller.test.js b/spec/javascript/controllers/layout_toggle_controller.test.jsindex 9d5b58b..fd1e8cc 100644--- a/spec/javascript/controllers/layout_toggle_controller.test.js+++ b/spec/javascript/controllers/layout_toggle_controller.test.js@@ -39,10 +39,7 @@ test('an open dialog or menu owns Escape before the detail lane', () => {'[data-ticket-bulk-panel-target="pickerMenu"]:not([hidden])',// The "Link" modal of a ticket page is the content of its frame, so it// exists only while open. Without it Escape closed the lane BEHIND it.- '[data-controller~="ticket-relation-modal"]',- // The "+" modal of "Alle Meetings": Escape closed it AND the lane behind- // it, with an unsaved edit in that lane.- '[data-meeting-modal-target="modal"]:not(.hidden)'+ '[data-controller~="ticket-relation-modal"]']for (const overlay of overlays) {diff --git a/spec/javascript/lib/meeting_modal.test.js b/spec/javascript/lib/meeting_modal.test.jsdeleted file mode 100644index d157d74..0000000--- a/spec/javascript/lib/meeting_modal.test.js+++ /dev/null@@ -1,93 +0,0 @@-// What: the two decisions of the org-wide "new meeting" modal (lib/meeting_modal.js).-// Why: both were review findings on PR #716 that no server-side spec can see, and-// spec/system does not run in CI while this file does (guards.yml -> npm test).-//-// newFormUrl: the modal lives OUTSIDE the results frame, and the filter bar-// reloads only that frame, so the page never re-renders and anything ERB put into-// every data-new-url is frozen at first load. The list frame writes its state at-// every load (data-list-filter-query); the modal adds exactly that.-//-// submissionClosesModal: Turbo's detail.success is response.ok AFTER fetch-// followed redirects. The area gate answers a denied write with redirect_to, so a-// modal closing on detail.success closed on a save that never happened, throwing-// away a pasted transcript and showing no reason.-import { test } from "node:test"-import assert from "node:assert/strict"-import { newFormUrl, submissionClosesModal, responseContentType } from "../../../app/javascript/lib/meeting_modal.js"--const BASE = "/organisations/o1/projects/p1/meetings/new?frame=modal"--const LIST = "search=Kickoff&filter%5Bproject%5D%5B%5D=p9&filter%5Bparticipant%5D%5B%5D=anna+mueller&filter_op%5Bparticipant%5D=and&smart_folder_id=v1"--test("adds the list state as it stands, the project condition as filter[project][]", () => {- const params = new URL(newFormUrl(BASE, LIST), "http://x.invalid").searchParams-- assert.equal(params.get("search"), "Kickoff")- assert.deepEqual(params.getAll("filter[project][]"), ["p9"])- assert.deepEqual(params.getAll("filter[participant][]"), ["anna mueller"])- assert.equal(params.get("filter_op[participant]"), "and")- assert.equal(params.get("smart_folder_id"), "v1")- // project_id is the nested route's OWN parameter; the list never names it.- assert.equal(params.get("project_id"), null)-})--test("keeps several values of one condition", () => {- const params = new URL(newFormUrl(BASE, "filter%5Bproject%5D%5B%5D=p1&filter%5Bproject%5D%5B%5D=p2"), "http://x.invalid").searchParams-- assert.deepEqual(params.getAll("filter[project][]"), ["p1", "p2"])-})--test("keeps the frame marker and the path untouched, even against the list state", () => {- const url = newFormUrl(BASE, "frame=other&search=Kickoff")-- assert.equal(url.split("?")[0], "/organisations/o1/projects/p1/meetings/new")- assert.deepEqual(new URL(url, "http://x.invalid").searchParams.getAll("frame"), ["modal"])-})--test("no option selected means no URL, so the frame falls back to its zero state", () => {- assert.equal(newFormUrl(undefined, LIST), null)- assert.equal(newFormUrl("", ""), null)-})--test("an empty list state leaves the base URL alone", () => {- assert.equal(newFormUrl(BASE), BASE)- assert.equal(newFormUrl(BASE, ""), BASE)- assert.equal(newFormUrl(BASE, null), BASE)-})--const turboStream = (ok) => ({- success: ok,- fetchResponse: { header: (n) => (n === "Content-Type" ? "text/vnd.turbo-stream.html; charset=utf-8" : null) }-})--test("closes only on a turbo-stream answer, which is the only proof of a save", () => {- assert.equal(submissionClosesModal(turboStream(true)), true)-})--test("does NOT close on a redirect that fetch followed to a 200 HTML page", () => {- // A revoked write, a deleted project or an expired session: ProjectController- // answers redirect_to, fetch follows it, response.ok is true. Closing here loses- // everything the reader typed and says nothing.- const redirected = {- success: true,- fetchResponse: { header: () => "text/html; charset=utf-8" }- }- assert.equal(submissionClosesModal(redirected), false)-})--test("does NOT close on a validation error, so the messages stay visible", () => {- assert.equal(submissionClosesModal(turboStream(false)), false)-})--test("does NOT close when the response shape is unknown", () => {- // Fail closed: an unreadable answer must leave the reader's work on screen.- assert.equal(submissionClosesModal(undefined), false)- assert.equal(submissionClosesModal({ success: true }), false)- assert.equal(submissionClosesModal({ success: true, fetchResponse: {} }), false)-})--test("reads the content type from the raw Response when Turbo's accessor is gone", () => {- const raw = { response: { headers: { get: () => "text/vnd.turbo-stream.html" } } }- assert.equal(responseContentType(raw), "text/vnd.turbo-stream.html")- assert.equal(submissionClosesModal({ success: true, fetchResponse: raw }), true)-})diff --git a/spec/requests/organisations/meetings_overview_create_spec.rb b/spec/requests/organisations/meetings_overview_create_spec.rbindex 8628966..1910e10 100644--- a/spec/requests/organisations/meetings_overview_create_spec.rb+++ b/spec/requests/organisations/meetings_overview_create_spec.rb@@ -214,7 +214,7 @@ RSpec.describe 'Organisations::MeetingsOverview create', type: :request doit 'falls back to the full page for an unknown frame value instead of half a page' 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: 'bogus'),headers: { 'Turbo-Frame' => 'meeting_new_form' }expect(response).to have_http_status(:ok)diff --git a/spec/requests/organisations/meetings_overview_spec.rb b/spec/requests/organisations/meetings_overview_spec.rbindex 8515e8b..879b8fc 100644--- a/spec/requests/organisations/meetings_overview_spec.rb+++ b/spec/requests/organisations/meetings_overview_spec.rb@@ -356,8 +356,8 @@ RSpec.describe 'Organisations::MeetingsOverview', type: :request doit 'shows the first-time empty state when there are no meetings at all, below the filter bar' dopage = listexpect(response.body).to include(I18n.t('views.organisations.meetings_overview.index.empty_first_time_title'))- # The bar stands from the start: the "+" modal replaces only the list- # frame, and a bar missing until a full reload is a page without its tools.+ # The bar stands from the start: a save from the "+" replaces only the+ # list frame, and a bar missing until a full reload is a page without its tools.expect(page).to have_css('[data-controller="filter-bar"]')end