From 7ab658f80d4ff9a726ddac1e6598bdf3acf4ce4d Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Thu, 10 Sep 2026 17:05:54 +0200 Subject: [PATCH] Use the shared inner scrolling layout in the visual briefing --- .../VisualBriefingAssistant.razor | 623 +++++++++--------- .../VisualBriefingAssistant.razor.css | 7 - 2 files changed, 314 insertions(+), 316 deletions(-) diff --git a/app/MindWork AI Studio/Assistants/VisualBriefing/VisualBriefingAssistant.razor b/app/MindWork AI Studio/Assistants/VisualBriefing/VisualBriefingAssistant.razor index f0e8f378..c9558bab 100644 --- a/app/MindWork AI Studio/Assistants/VisualBriefing/VisualBriefingAssistant.razor +++ b/app/MindWork AI Studio/Assistants/VisualBriefing/VisualBriefingAssistant.razor @@ -6,7 +6,10 @@ -
+ @* The assistant does not inherit AssistantBase, so it sets up the inner scrolling itself, the + way the log viewer does. A plain div is enough here: unlike AssistantBase, this assistant + deliberately has no area-wide drop zone, because its two zones have to be aimed at. *@ +
@T("Visual Briefings") @@ -14,326 +17,328 @@ - - @foreach (var project in this.projects) - { - - - @this.ProjectDisplayName(project) - @project.ModifiedAtUtc.ToLocalTime().ToString("g") - @if (!project.IsAvailable) - { - @this.ProjectStatusName(project.Status) - } - @if (project.IsAvailable && this.IsGenerating(project.BriefingId)) - { - - } - @if (project.IsAvailable) - { - - } - - - } - - - - @T("New briefing") - @T("Import") - - - - -
- @if (this.selectedProject is not null && !this.selectedProject.IsAvailable) - { - - - @this.ProjectDisplayName(this.selectedProject) - - @this.ProjectRecoveryMessage(this.selectedProject.Status) - - @T("AI Studio has left the project files unchanged. A future update may make this visual briefing accessible again.") - - @T("Project ID"): @this.selectedProject.BriefingId.ToString("D") - + + + @foreach (var project in this.projects) + { + + + @this.ProjectDisplayName(project) + @project.ModifiedAtUtc.ToLocalTime().ToString("g") + @if (!project.IsAvailable) + { + @this.ProjectStatusName(project.Status) + } + @if (project.IsAvailable && this.IsGenerating(project.BriefingId)) + { + + } + @if (project.IsAvailable) + { + + } - - @T("If you need help, report the problem and include the project ID.") - @T("Report a problem?") - - - @T("Open project folder") - @T("Delete") - - - - } - else if (this.selectedBriefing is null) - { - - @T("Create or import a visual briefing to begin.") - - } - else - { - - - @this.editor.Name - - @T("Rename") - @T("Delete") - - + + } + - - - - + + @T("New briefing") + @T("Import") + + + + +
+ @if (this.selectedProject is not null && !this.selectedProject.IsAvailable) + { + + + @this.ProjectDisplayName(this.selectedProject) + + @this.ProjectRecoveryMessage(this.selectedProject.Status) + + @T("AI Studio has left the project files unchanged. A future update may make this visual briefing accessible again.") + + @T("Project ID"): @this.selectedProject.BriefingId.ToString("D") + + + + @T("If you need help, report the problem and include the project ID.") + @T("Report a problem?") + + + @T("Open project folder") + @T("Delete") + + + + } + else if (this.selectedBriefing is null) + { + + @T("Create or import a visual briefing to begin.") + + } + else + { + + + @this.editor.Name + + @T("Rename") + @T("Delete") + + + + + + + + + + + + + + + + + + + + + @T("Source material") + @T("Documents, spreadsheets, images, audio, and video are considered as source context.") + @* No default target on purpose: with two zones side by side, the + user has to aim at the one they mean. *@ + + - - + + + @T("Visual assets") + @T("PNG, JPEG, and WebP assets are analyzed and must appear visibly in the briefing.") + + - - - - - - - - @T("Source material") - @T("Documents, spreadsheets, images, audio, and video are considered as source context.") - @* No default target on purpose: with two zones side by side, the - user has to aim at the one they mean. *@ - - - - - - @T("Visual assets") - @T("PNG, JPEG, and WebP assets are analyzed and must appear visibly in the briefing.") - - - - - - @if (this.selectedBriefing.Sources.Count > 0) - { - - - @T("Linked sources") - @T("Refresh status") - - - - @T("File") - @T("Kind") - @T("Status") - @T("Actions") - - - @Path.GetFileName(context.Path) - @context.Kind - - @this.SourceStatusName(context.Status) - - - - - - @if (context.IsMedia && context.Status is VisualBriefingSourceStatus.TRANSCRIPT_OUTDATED) - { - - + @if (this.selectedBriefing.Sources.Count > 0) + { + + + @T("Linked sources") + @T("Refresh status") + + + + @T("File") + @T("Kind") + @T("Status") + @T("Actions") + + + @Path.GetFileName(context.Path) + @context.Kind + + @this.SourceStatusName(context.Status) + + + + - } - - - - - - + @if (context.IsMedia && context.Status is VisualBriefingSourceStatus.TRANSCRIPT_OUTDATED) + { + + + + } + + + + + + + + } + + + @T("Briefing settings") + @* + The confidence belongs to the provider chosen right next to it, so both share one row. + It uses the icon trigger, like the chat does, so this row ends the same way the profile + row below it does: a field followed by one compact icon button. + Do not add a margin to that button to "correct" its height: a dense outlined select with + a label carries margin-top 8px and margin-bottom 4px of its own, so centring the boxes + already lands within a few pixels of the visible frame, and any added margin makes it + worse. Baseline alignment does not work here either, because the wrapper below takes + its baseline from its last line box, which sits under the input. + *@ + + @* ProviderSelection marks its select as flex-grow-0, and that utility is declared + !important, so StretchItems cannot widen it. The width has to come from here. *@ +
+ +
+ @if (this.SettingsManager.ConfigurationData.Confidence.ShowProviderConfidence) + { + + } +
+ + + + + + + + @T("Show source references") + @T("Optimize large visual assets")
+ + + @if (this.selectedBriefing.Versions.Count == 0) + { + @T("Create briefing") + } + else + { + + + @T("Change design") + + + + + @T("Update content") + + + + + @T("Rebuild briefing") + + + + + @T("Recompile briefing") + + + } + @if (this.CurrentBuildSession?.IsActive == true) + { + + @(this.IsCurrentBuildCanceling ? T("Stopping build...") : T("Stop build")) + + } + +
+ + + + @if (this.latestBuild is not null) + { + } - - @T("Briefing settings") - @* - The confidence belongs to the provider chosen right next to it, so both share one row. - It uses the icon trigger, like the chat does, so this row ends the same way the profile - row below it does: a field followed by one compact icon button. - Do not add a margin to that button to "correct" its height: a dense outlined select with - a label carries margin-top 8px and margin-bottom 4px of its own, so centring the boxes - already lands within a few pixels of the visible frame, and any added margin makes it - worse. Baseline alignment does not work here either, because the wrapper below takes - its baseline from its last line box, which sits under the input. - *@ - - @* ProviderSelection marks its select as flex-grow-0, and that utility is declared - !important, so StretchItems cannot widen it. The width has to come from here. *@ -
- + @if (this.reusableContentBuildId is { } reusableBuildId) + { + + + @T("The updated content no longer fits the current presentation. You can continue as a rebuild without another content model call.") + + @T("Continue as rebuild") + + + + } + + @if (this.lastBuildDiagnostics is not null) + { + + @T("Copy technical details") + + } + + @if (this.selectedBriefing.Versions.Count > 0) + { + + + + + + @foreach (var version in this.selectedBriefing.Versions.OrderByDescending(version => version.VersionNumber)) + { + @($"v{version.VersionNumber} · {version.EditMode} · {version.CreatedAtUtc.ToLocalTime():g}") + } + + + + + + @* MudToggleItem has no Icon parameter; the icon has to be set for both states. *@ + + + + + @T("Export") + + +
+ @if (!string.IsNullOrWhiteSpace(this.previewUrl)) + { + + }
- @if (this.SettingsManager.ConfigurationData.Confidence.ShowProviderConfidence) - { - - } - - - - - - - - - @T("Show source references") - @T("Optimize large visual assets") -
- - - @if (this.selectedBriefing.Versions.Count == 0) - { - @T("Create briefing") - } - else - { - - - @T("Change design") - - - - - @T("Update content") - - - - - @T("Rebuild briefing") - - - - - @T("Recompile briefing") - - - } - @if (this.CurrentBuildSession?.IsActive == true) - { - - @(this.IsCurrentBuildCanceling ? T("Stopping build...") : T("Stop build")) - - } - - - - - - @if (this.latestBuild is not null) - { - + + } } - - @if (this.reusableContentBuildId is { } reusableBuildId) - { - - - @T("The updated content no longer fits the current presentation. You can continue as a rebuild without another content model call.") - - @T("Continue as rebuild") - - - - } - - @if (this.lastBuildDiagnostics is not null) - { - - @T("Copy technical details") - - } - - @if (this.selectedBriefing.Versions.Count > 0) - { - - - - - - @foreach (var version in this.selectedBriefing.Versions.OrderByDescending(version => version.VersionNumber)) - { - @($"v{version.VersionNumber} · {version.EditMode} · {version.CreatedAtUtc.ToLocalTime():g}") - } - - - - - - @* MudToggleItem has no Icon parameter; the icon has to be set for both states. *@ - - - - - @T("Export") - - -
- @if (!string.IsNullOrWhiteSpace(this.previewUrl)) - { - - } -
-
- } - } -
+
+
\ No newline at end of file diff --git a/app/MindWork AI Studio/Assistants/VisualBriefing/VisualBriefingAssistant.razor.css b/app/MindWork AI Studio/Assistants/VisualBriefing/VisualBriefingAssistant.razor.css index 3f54c16f..4b231297 100644 --- a/app/MindWork AI Studio/Assistants/VisualBriefing/VisualBriefingAssistant.razor.css +++ b/app/MindWork AI Studio/Assistants/VisualBriefing/VisualBriefingAssistant.razor.css @@ -1,10 +1,3 @@ -.visual-briefing-shell { - height: 100%; - min-height: 0; - overflow-x: hidden; - overflow-y: auto; -} - .visual-briefing-main { min-width: 0; padding-bottom: 1rem;