Skip to content

Make videos on the computer you already own. FreeVideo runs MiniMax H3 in as little as 8 GB of VRAM and 16 GB of RAM, and adapts its acceleration path to your hardware.

Errors with a diagnostic report submit through the report route

Bowen Xuef98d3db5f84c
diff --git a/web/editor_failure.js b/web/editor_failure.js
index 02df4df..f78e879 100644
--- a/web/editor_failure.js
+++ b/web/editor_failure.js
@@ -1,6 +1,6 @@
import {attemptClip, find} from './editor_model.js';
import {createErrorReport} from './error_panel.js';
-import {saveReport, showReportTip, reportIssue} from './report_issue.js';
+import {saveReport, showReportTip, focusReportTip, reportIssue} from './report_issue.js';
import {productVersion} from './updates.js';
// Receipts belong to an attempt, not to saved projects or undo history.
@@ -68,6 +68,7 @@ export function createEditorFailures({api, state, jobStatuses, reasonText}) {
report,
async download(id, {bar, anchor, t, current = () => true}) {
const found = receipt(id); if (!found) return;
+ if (focusReportTip(bar)) return;
let blob;
if (found.reportId) {
const response = await api.fetchApi(`/freevideo/report/${found.reportId}`);
diff --git a/web/error_panel.js b/web/error_panel.js
index fbdeee1..77124c8 100644
--- a/web/error_panel.js
+++ b/web/error_panel.js
@@ -3,6 +3,7 @@ import {repairAction} from './repair_hint.js';
import {detectBrowserExtension, browserExtensionAdvice, extensionSteps, isNetworkTypeError, connectionLostText} from './browser_extension.js';
import {SAMPLING_EFFORTS, STEP_CACHES, UPSCALE_FACTORS, tableLevel} from './sampling_effort.js';
import {failureIssue, failureStage} from './failure_issue.js';
+import {focusReportTip, reportIssue, showReportTip} from './report_issue.js';
const reports = new WeakSet();
const captured = new WeakMap();
const diagnosticReports = new WeakSet();
@@ -441,6 +442,8 @@ function showFailureDialog(report, t) {
dialog.freevideoError = identity;
dialog.setAttribute('aria-label', t('FreeVideo error', 'FreeVideo 错误'));
const panel = createErrorPanel(t); panel.show(report, false);
+ // The dialog has no run's report to download; submitting stays on the failure card.
+ if (diagnosticReports.has(report)) panel.element.querySelector('.fv-failure-github:not([data-lora])')?.remove();
const close = document.createElement('button'); close.type = 'button';
close.textContent = t('Got it', '知道了'); close.autofocus = true;
close.onclick = () => dialog.close();
@@ -498,7 +501,9 @@ export function adviceFor(report, t, value) {
return {advice, generated};
}
-export function createErrorPanel(t) {
+// route: where a generation's diagnostic report comes from ({download, fetch, version, has}); without it the
+// button opens the feedback form.
+export function createErrorPanel(t, route = null) {
if (!document.getElementById('freevideo-error-style')) {
const style = document.createElement('style'); style.id = 'freevideo-error-style';
style.textContent = `.fv-failure{border:1px solid var(--fv-danger,#dc7c7c);border-radius:var(--fv-r-md,12px);padding:12px 14px;margin:10px 0;text-align:left;min-width:0}
@@ -562,6 +567,13 @@ export function createErrorPanel(t) {
const loadIssueModules = () => import('./feedback.js').then(feedback => import('./updates.js').then(updates => { issueModules = {feedback, updates}; })).catch(() => {});
github.onclick = async () => {
if (!currentReport) return;
+ // A generation with a diagnostic report goes the report route: save it, then the tip opens the form.
+ if (route?.has() && diagnosticReports.has(currentReport) && !githubLora) {
+ if (focusReportTip(head)) return;
+ try { await route.download(); } catch { return; }
+ showReportTip(head, github, t, {mode: 'downloaded', submit: () => reportIssue(route.fetch, route.version(), {save: false})});
+ return;
+ }
if (!issueModules) await loadIssueModules();
if (!issueModules) return;
const draft = failureIssue(currentReport, element.freevideoKind, {lora: githubLora, t});
@@ -645,6 +657,7 @@ export function createErrorPanel(t) {
// An int8 limit is not a judgement, so there is no mistake to report.
github.hidden = !generated || advice.kind === 'lora-int8'; githubLora = lora;
github.textContent = lora ? t('Report a mistake', '报告误判') : t('Report a problem', '提交问题');
+ github.toggleAttribute('data-lora', lora);
if (generated && typeof window !== 'undefined') loadIssueModules();
if (popup) showFailureDialog(report, t);
return report;
diff --git a/web/generation_progress.js b/web/generation_progress.js
index 31df724..1880718 100644
--- a/web/generation_progress.js
+++ b/web/generation_progress.js
@@ -1,5 +1,5 @@
// One whole-video estimate and the same five rows in Studio and the node view.
-import { saveReport, reportIssue, showReportTip } from './report_issue.js';
+import { saveReport, reportIssue, showReportTip, focusReportTip } from './report_issue.js';
import { issueButton } from './issue_button.js';
const css = document.createElement('link');
css.rel = 'stylesheet'; css.href = new URL('./generation_progress.css', import.meta.url).href;
@@ -403,6 +403,7 @@ export function createDiagnosticReportControl(t, {api = null, fallback = null, t
async function downloadReport() { await saveReport(await fetchReport()); }
report.onclick = async () => {
if (report.disabled || report.hidden) return;
+ if (tip && report.isConnected && focusReportTip(report.parentElement)) return;
problem?.remove();
const current = revision;
report.disabled = true; report.textContent = t('Preparing report…', '正在整理报告…');
diff --git a/web/image_generation.js b/web/image_generation.js
index 894a0eb..05ddb97 100644
--- a/web/image_generation.js
+++ b/web/image_generation.js
@@ -2,7 +2,7 @@
// owns its document/history; this module inserts a result through its commands.
import * as commands from './image_commands.js';
import {orientMatrix, rasterKinds, scaleSelection} from './image_editor_engine.js';
-import {saveReport, reportIssue, showReportTip} from './report_issue.js';
+import {saveReport, reportIssue, showReportTip, focusReportTip} from './report_issue.js';
import {issueButton} from './issue_button.js';
import {about} from './request_assets.js';
@@ -239,6 +239,7 @@ export function renderImageFailure(host, {error, report_id, stage, fitted, info}
issue.hidden = true;
anchor.onclick = async () => {
if (anchor.disabled) return;
+ if (focusReportTip(bar)) return;
const restoreFocus = doc.activeElement === anchor;
issue.hidden = true;
anchor.disabled = true; anchor.textContent = t(...REPORT_LABELS.preparing);
diff --git a/web/issue_button.js b/web/issue_button.js
index 0eeaf64..e43af07 100644
--- a/web/issue_button.js
+++ b/web/issue_button.js
@@ -2,6 +2,7 @@
// shows one. A click opens the GitHub feedback form with the error sentence already in it; the report
// and typed text never travel (the message goes through the same redaction as the failure card's report).
import {createErrorReport} from './error_panel.js';
+import {focusReportTip, reportIssue, showReportTip} from './report_issue.js';
const MESSAGE = 300, TAIL = 1500;
const ISSUE_FORM = 'https://github.com/FlashML-org/FreeVideo/issues/new';
@@ -47,8 +48,12 @@ function style() {
document.head.append(sheet);
}
-/** The button. `source` is {where, message, kind} or a function returning it when clicked (null: nothing to send). */
-export function issueButton(t, source, {className = '', open = (url, features) => globalThis.open?.(url, '_blank', features)} = {}) {
+/**
+ * The button. `source` is {where, message, kind} or a function returning it when clicked (null: nothing to send).
+ * `route` ({has, download, fetch, version}) is a run's diagnostic report: while it exists the click saves it and
+ * the report tip opens the form, instead of the feedback form.
+ */
+export function issueButton(t, source, {className = '', route = null, open = (url, features) => globalThis.open?.(url, '_blank', features)} = {}) {
style();
const button = document.createElement('button'); button.type = 'button';
button.className = `fv-issue-button ${className}`.trim();
@@ -59,6 +64,12 @@ export function issueButton(t, source, {className = '', open = (url, features) =
button.onclick = async () => {
const value = typeof source === 'function' ? source() : source;
if (!value) return;
+ if (route?.has()) {
+ if (focusReportTip(button.parentElement)) return;
+ try { await route.download(); } catch { return; }
+ showReportTip(button.parentElement, button, t, {mode: 'downloaded', submit: () => reportIssue(route.fetch, route.version(), {save: false})});
+ return;
+ }
const ready = await load();
const draft = issueDraft(value, t);
// Modules that did not load still leave the blank form reachable.
diff --git a/web/report_issue.js b/web/report_issue.js
index e93b314..6e7a5f7 100644
--- a/web/report_issue.js
+++ b/web/report_issue.js
@@ -148,6 +148,18 @@ const reducedMotion = () => typeof matchMedia === 'function' && matchMedia('(pre
// saved it: Submit only opens the form). `submit` resolves to the form's
// address; `onHide` runs when the user closes the card, not on a redraw;
// `animate: false` redraws a card that was already showing.
+// The 'downloaded' card already showing under `bar`, if any. A second press on
+// Report moves focus to its button instead of saving another copy of the report.
+export function focusReportTip(bar) {
+ const tip = bar?.parentElement?.querySelector(':scope > .fv-report-tip-downloaded:not(.fv-report-tip-leaving)');
+ if (!tip) return false;
+ tip.querySelector('.fv-action-primary, .fv-action')?.focus({preventScroll: true});
+ return true;
+}
+export function hideReportTip(bar) {
+ bar?.parentElement?.querySelector(':scope > .fv-report-tip:not(.fv-report-tip-leaving)')?.remove();
+}
+
export function showReportTip(bar, anchor, t, {mode = 'invite', submit, onHide = null, animate = true} = {}) {
bar.parentElement.querySelector(':scope > .fv-report-tip:not(.fv-report-tip-leaving)')?.remove();
const tip = el('div', 'fv-report-tip'); tip.setAttribute('role', 'region');
@@ -170,7 +182,9 @@ export function showReportTip(bar, anchor, t, {mode = 'invite', submit, onHide =
{duration: 240, easing: 'cubic-bezier(.4,0,.2,1)', fill: 'forwards'}).finished.then(() => tip.remove(), () => tip.remove());
};
const dismiss = () => { closeForGood(); hide(); };
- close.onclick = dismiss;
+ // Leaving by hand returns focus to the Report button, as Esc does.
+ const leave = () => { dismiss(); anchor.focus(); };
+ close.onclick = leave;
function sent(address) {
tip.classList.add('fv-report-tip-sent'); anchor.classList.remove('fv-report-attention');
mark.replaceChildren(glyph('done'));
@@ -187,13 +201,14 @@ export function showReportTip(bar, anchor, t, {mode = 'invite', submit, onHide =
link.href = address; link.target = '_blank'; link.rel = 'noopener';
note.replaceChildren(link);
const done = el('button', 'fv-action fv-action-secondary', t('Done', '完成')); done.type = 'button';
- done.onclick = dismiss;
+ done.onclick = leave;
row.replaceChildren(done);
close.remove();
done.focus({preventScroll: true});
}
mark.append(glyph('report'));
if (mode === 'downloaded') {
+ tip.classList.add('fv-report-tip-downloaded');
title.textContent = t('Diagnostic report downloaded', '诊断报告已下载');
} else {
title.textContent = t('Share a diagnostic report?', '欢迎提交诊断报告');
@@ -218,7 +233,7 @@ export function showReportTip(bar, anchor, t, {mode = 'invite', submit, onHide =
tip.append(card);
tip.addEventListener('keydown', event => {
if (event.key !== 'Escape') return;
- event.preventDefault(); event.stopPropagation(); dismiss(); anchor.focus();
+ event.preventDefault(); event.stopPropagation(); leave();
});
if (mode === 'invite') anchor.classList.add('fv-report-attention');
bar.after(tip);
diff --git a/web/result_actions.css b/web/result_actions.css
index 42313b4..2f0c101 100644
--- a/web/result_actions.css
+++ b/web/result_actions.css
@@ -31,36 +31,36 @@
.fv-actions .fv-action-danger:hover{border-color:color-mix(in srgb,var(--fv-danger,#f09aa2) 45%,transparent);background:var(--fv-danger-subtle,#30212a);color:var(--fv-danger,#f09aa2)}
/* The report card: its own row under the action bar, never over the video. Script
opens and closes the row by height, so the picture above eases instead of jumping. */
-.fv-result-links>.fv-report-tip{flex:1 0 100%;box-sizing:border-box;padding-top:6px;overflow:hidden;container-type:inline-size}
-.fv-result-links>.fv-report-tip .fv-report-tip-card{position:relative;display:flex;align-items:center;gap:14px;box-sizing:border-box;padding:12px 12px 12px 14px;border:1px solid color-mix(in srgb,var(--fv-accent,#6db8fa) 28%,var(--fv-border,#2a3443));border-radius:14px;background:color-mix(in srgb,var(--fv-accent,#6db8fa) 8%,var(--fv-card,#1a222e));box-shadow:inset 0 1px 0 #ffffff0a;color:var(--fv-ink,#eee);font:13px/1.55 var(--fv-font,system-ui);text-align:left}
-.fv-result-links>.fv-report-tip .fv-report-tip-card::before{content:'';position:absolute;top:-6px;left:calc(var(--fv-tip-notch,50%) - 5px);width:10px;height:10px;box-sizing:border-box;border:solid color-mix(in srgb,var(--fv-accent,#6db8fa) 28%,var(--fv-border,#2a3443));border-width:1px 0 0 1px;border-radius:2px 0 0 0;background:color-mix(in srgb,var(--fv-accent,#6db8fa) 8%,var(--fv-card,#1a222e));transform:rotate(45deg)}
-.fv-result-links>.fv-report-tip .fv-report-tip-glyph,.fv-result-links>.fv-report-tip .fv-report-tip-lock{display:inline-flex;flex:none}
-.fv-result-links>.fv-report-tip .fv-report-tip-glyph svg,.fv-result-links>.fv-report-tip .fv-report-tip-lock svg{width:100%;height:100%}
-.fv-result-links>.fv-report-tip .fv-report-tip-mark{flex:none;display:grid;place-items:center;width:36px;height:36px;border-radius:11px;background:linear-gradient(150deg,color-mix(in srgb,var(--fv-accent,#6db8fa) 30%,transparent),color-mix(in srgb,var(--fv-accent,#6db8fa) 10%,transparent));color:var(--fv-accent,#6db8fa);transition:background .2s,color .2s}
-.fv-result-links>.fv-report-tip .fv-report-tip-mark .fv-report-tip-glyph{width:18px;height:18px}
-.fv-result-links>.fv-report-tip.fv-report-tip-sent .fv-report-tip-mark{background:linear-gradient(150deg,color-mix(in srgb,var(--fv-success,#76d9b3) 30%,transparent),color-mix(in srgb,var(--fv-success,#76d9b3) 10%,transparent));color:var(--fv-success,#76d9b3)}
-.fv-result-links>.fv-report-tip .fv-report-tip-text{flex:1;min-width:0;display:grid;gap:2px}
+:is(.fv-result-links,.fv-failure,.fv-preview-column)>.fv-report-tip{flex:1 0 100%;box-sizing:border-box;padding-top:6px;overflow:hidden;container-type:inline-size}
+:is(.fv-result-links,.fv-failure,.fv-preview-column)>.fv-report-tip .fv-report-tip-card{position:relative;display:flex;align-items:center;gap:14px;box-sizing:border-box;padding:12px 12px 12px 14px;border:1px solid color-mix(in srgb,var(--fv-accent,#6db8fa) 28%,var(--fv-border,#2a3443));border-radius:14px;background:color-mix(in srgb,var(--fv-accent,#6db8fa) 8%,var(--fv-card,#1a222e));box-shadow:inset 0 1px 0 #ffffff0a;color:var(--fv-ink,#eee);font:13px/1.55 var(--fv-font,system-ui);text-align:left}
+:is(.fv-result-links,.fv-failure,.fv-preview-column)>.fv-report-tip .fv-report-tip-card::before{content:'';position:absolute;top:-6px;left:calc(var(--fv-tip-notch,50%) - 5px);width:10px;height:10px;box-sizing:border-box;border:solid color-mix(in srgb,var(--fv-accent,#6db8fa) 28%,var(--fv-border,#2a3443));border-width:1px 0 0 1px;border-radius:2px 0 0 0;background:color-mix(in srgb,var(--fv-accent,#6db8fa) 8%,var(--fv-card,#1a222e));transform:rotate(45deg)}
+:is(.fv-result-links,.fv-failure,.fv-preview-column)>.fv-report-tip .fv-report-tip-glyph,:is(.fv-result-links,.fv-failure,.fv-preview-column)>.fv-report-tip .fv-report-tip-lock{display:inline-flex;flex:none}
+:is(.fv-result-links,.fv-failure,.fv-preview-column)>.fv-report-tip .fv-report-tip-glyph svg,:is(.fv-result-links,.fv-failure,.fv-preview-column)>.fv-report-tip .fv-report-tip-lock svg{width:100%;height:100%}
+:is(.fv-result-links,.fv-failure,.fv-preview-column)>.fv-report-tip .fv-report-tip-mark{flex:none;display:grid;place-items:center;width:36px;height:36px;border-radius:11px;background:linear-gradient(150deg,color-mix(in srgb,var(--fv-accent,#6db8fa) 30%,transparent),color-mix(in srgb,var(--fv-accent,#6db8fa) 10%,transparent));color:var(--fv-accent,#6db8fa);transition:background .2s,color .2s}
+:is(.fv-result-links,.fv-failure,.fv-preview-column)>.fv-report-tip .fv-report-tip-mark .fv-report-tip-glyph{width:18px;height:18px}
+:is(.fv-result-links,.fv-failure,.fv-preview-column)>.fv-report-tip.fv-report-tip-sent .fv-report-tip-mark{background:linear-gradient(150deg,color-mix(in srgb,var(--fv-success,#76d9b3) 30%,transparent),color-mix(in srgb,var(--fv-success,#76d9b3) 10%,transparent));color:var(--fv-success,#76d9b3)}
+:is(.fv-result-links,.fv-failure,.fv-preview-column)>.fv-report-tip .fv-report-tip-text{flex:1;min-width:0;display:grid;gap:2px}
/* Chinese breaks at its punctuation when it can; two lines come out even. */
-.fv-result-links>.fv-report-tip .fv-report-tip-title,.fv-result-links>.fv-report-tip .fv-report-tip-lead,.fv-result-links>.fv-report-tip .fv-report-tip-note{text-wrap:balance;word-break:keep-all;overflow-wrap:anywhere}
-.fv-result-links>.fv-report-tip .fv-report-tip-title{font-size:13.5px;font-weight:600;line-height:1.45;color:var(--fv-ink,#eee)}
-.fv-result-links>.fv-report-tip .fv-report-tip-lead{margin:0;font-size:13px;line-height:1.55;color:color-mix(in srgb,var(--fv-ink,#eee) 86%,var(--fv-muted,#a5b3c6))}
-.fv-result-links>.fv-report-tip .fv-report-tip-note{display:flex;align-items:flex-start;gap:5px;margin-top:2px;font-size:12px;line-height:1.45;color:var(--fv-muted,#a5b3c6)}
-.fv-result-links>.fv-report-tip .fv-report-tip-lock{width:12px;height:12px;margin-top:2.5px;opacity:.85}
-.fv-result-links>.fv-report-tip .fv-report-tip-note a{display:inline;height:auto;min-height:0;margin:0;padding:0;border:0;background:none;box-shadow:none;color:var(--fv-accent,#6db8fa);font:inherit;text-decoration:none}
-.fv-result-links>.fv-report-tip .fv-report-tip-note a:hover{text-decoration:underline}
-.fv-result-links>.fv-report-tip .fv-report-tip-actions{flex:none;gap:6px}
-.fv-result-links>.fv-report-tip .fv-report-tip-actions .fv-action{height:34px;min-height:34px;padding:0 14px;gap:6px}
-.fv-result-links>.fv-report-tip .fv-report-tip-actions .fv-action .fv-report-tip-glyph{width:13px;height:13px;opacity:.85}
-.fv-result-links>.fv-report-tip .fv-report-tip-close{flex:none;display:grid;place-items:center;width:30px;height:30px;margin:0;padding:0;border:0;border-radius:9px;background:none;color:var(--fv-muted,#a5b3c6);cursor:pointer;box-shadow:none}
-.fv-result-links>.fv-report-tip .fv-report-tip-close:hover{background:color-mix(in srgb,var(--fv-ink,#eee) 8%,transparent);color:var(--fv-ink,#eee)}
-.fv-result-links>.fv-report-tip .fv-report-tip-close:focus-visible{outline:2px solid color-mix(in srgb,var(--fv-accent,#6db8fa) 70%,transparent);outline-offset:1px}
-.fv-result-links>.fv-report-tip .fv-report-tip-close .fv-report-tip-glyph{width:14px;height:14px}
+:is(.fv-result-links,.fv-failure,.fv-preview-column)>.fv-report-tip .fv-report-tip-title,:is(.fv-result-links,.fv-failure,.fv-preview-column)>.fv-report-tip .fv-report-tip-lead,:is(.fv-result-links,.fv-failure,.fv-preview-column)>.fv-report-tip .fv-report-tip-note{text-wrap:balance;word-break:keep-all;overflow-wrap:anywhere}
+:is(.fv-result-links,.fv-failure,.fv-preview-column)>.fv-report-tip .fv-report-tip-title{font-size:13.5px;font-weight:600;line-height:1.45;color:var(--fv-ink,#eee)}
+:is(.fv-result-links,.fv-failure,.fv-preview-column)>.fv-report-tip .fv-report-tip-lead{margin:0;font-size:13px;line-height:1.55;color:color-mix(in srgb,var(--fv-ink,#eee) 86%,var(--fv-muted,#a5b3c6))}
+:is(.fv-result-links,.fv-failure,.fv-preview-column)>.fv-report-tip .fv-report-tip-note{display:flex;align-items:flex-start;gap:5px;margin-top:2px;font-size:12px;line-height:1.45;color:var(--fv-muted,#a5b3c6)}
+:is(.fv-result-links,.fv-failure,.fv-preview-column)>.fv-report-tip .fv-report-tip-lock{width:12px;height:12px;margin-top:2.5px;opacity:.85}
+:is(.fv-result-links,.fv-failure,.fv-preview-column)>.fv-report-tip .fv-report-tip-note a{display:inline;height:auto;min-height:0;margin:0;padding:0;border:0;background:none;box-shadow:none;color:var(--fv-accent,#6db8fa);font:inherit;text-decoration:none}
+:is(.fv-result-links,.fv-failure,.fv-preview-column)>.fv-report-tip .fv-report-tip-note a:hover{text-decoration:underline}
+:is(.fv-result-links,.fv-failure,.fv-preview-column)>.fv-report-tip .fv-report-tip-actions{flex:none;gap:6px}
+:is(.fv-result-links,.fv-failure,.fv-preview-column)>.fv-report-tip .fv-report-tip-actions .fv-action{height:34px;min-height:34px;padding:0 14px;gap:6px}
+:is(.fv-result-links,.fv-failure,.fv-preview-column)>.fv-report-tip .fv-report-tip-actions .fv-action .fv-report-tip-glyph{width:13px;height:13px;opacity:.85}
+:is(.fv-result-links,.fv-failure,.fv-preview-column)>.fv-report-tip .fv-report-tip-close{flex:none;display:grid;place-items:center;width:30px;height:30px;margin:0;padding:0;border:0;border-radius:9px;background:none;color:var(--fv-muted,#a5b3c6);cursor:pointer;box-shadow:none}
+:is(.fv-result-links,.fv-failure,.fv-preview-column)>.fv-report-tip .fv-report-tip-close:hover{background:color-mix(in srgb,var(--fv-ink,#eee) 8%,transparent);color:var(--fv-ink,#eee)}
+:is(.fv-result-links,.fv-failure,.fv-preview-column)>.fv-report-tip .fv-report-tip-close:focus-visible{outline:2px solid color-mix(in srgb,var(--fv-accent,#6db8fa) 70%,transparent);outline-offset:1px}
+:is(.fv-result-links,.fv-failure,.fv-preview-column)>.fv-report-tip .fv-report-tip-close .fv-report-tip-glyph{width:14px;height:14px}
/* While the invitation shows, a dot on the Diagnostic report button ties the two together. */
.fv-actions .fv-action-report{position:relative}
.fv-actions .fv-action-report.fv-report-attention::after{content:'';position:absolute;top:-3px;right:-3px;width:9px;height:9px;border-radius:50%;background:var(--fv-accent,#6db8fa);box-shadow:0 0 0 2px var(--fv-bg,#111720)}
/* A narrow card keeps the text on full-width lines and moves the button below it. */
-@container (max-width:640px){.fv-result-links>.fv-report-tip .fv-report-tip-card{flex-wrap:wrap;align-items:flex-start;padding-right:40px}.fv-result-links>.fv-report-tip .fv-report-tip-text{flex:1 1 calc(100% - 50px)}.fv-result-links>.fv-report-tip .fv-report-tip-actions{margin-left:50px}.fv-result-links>.fv-report-tip .fv-report-tip-close{position:absolute;top:8px;right:8px}}
-@media(prefers-reduced-motion:reduce){.fv-result-links>.fv-report-tip .fv-report-tip-mark{transition:none}}
+@container (max-width:640px){:is(.fv-result-links,.fv-failure,.fv-preview-column)>.fv-report-tip .fv-report-tip-card{flex-wrap:wrap;align-items:flex-start;padding-right:40px}:is(.fv-result-links,.fv-failure,.fv-preview-column)>.fv-report-tip .fv-report-tip-text{flex:1 1 calc(100% - 50px)}:is(.fv-result-links,.fv-failure,.fv-preview-column)>.fv-report-tip .fv-report-tip-actions{margin-left:50px}:is(.fv-result-links,.fv-failure,.fv-preview-column)>.fv-report-tip .fv-report-tip-close{position:absolute;top:8px;right:8px}}
+@media(prefers-reduced-motion:reduce){:is(.fv-result-links,.fv-failure,.fv-preview-column)>.fv-report-tip .fv-report-tip-mark{transition:none}}
@keyframes fv-menu-enter{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.fv-actions *{transition:none!important;animation:none!important}}
.fv-actions[data-unavailable=true] :is(a.fv-action[download],.fv-action-extend,.fv-share-trigger){opacity:.45;cursor:default;pointer-events:none}
diff --git a/web/studio.js b/web/studio.js
index 2f33f86..fde4fb0 100644
--- a/web/studio.js
+++ b/web/studio.js
@@ -12,7 +12,7 @@ import { viewSwitch, viewChanged, agentTabReady, openAutopilot } from './view_na
import { agentInterfaceState } from './agent_connect.js';
import { createUpdateNotice, createVersionInfo, productVersion } from './updates.js';
import { createPortNotice } from './port_notice.js';
-import { reportIssue, reportTipClosed, showReportTip } from './report_issue.js';
+import { focusReportTip, hideReportTip, reportIssue, reportTipClosed, showReportTip } from './report_issue.js';
import { issueButton } from './issue_button.js';
import { createPreviewScene } from './preview_scene.js?v=20260929-swell';
import { animateDetails, closeDialog } from './motion.js';
@@ -1211,7 +1211,7 @@ export function openStudio(node, {extendFrom = null} = {}) {
showReportTip(bar, anchor, t, {mode, animate, onHide: () => { reportTipFor = null; },
submit: () => reportIssue(progress.fetchReport, productVersion(), {save: mode === 'invite'})});
}
- async function downloadReport() { await progress.downloadReport(); reportCard('downloaded'); }
+ async function downloadReport() { if (focusReportTip(links.querySelector('.fv-actions'))) return; await progress.downloadReport(); reportCard('downloaded'); }
function placeReportTip(delay) {
clearTimeout(reportTipTimer);
reportTipTimer = setTimeout(() => {
@@ -1268,9 +1268,15 @@ export function openStudio(node, {extendFrom = null} = {}) {
}
const status = el('div', '', 'fv-status'); status.setAttribute('role', 'status');
// A fault in the status line carries the report button; the next text written to the line removes it.
- const statusIssue = issueButton(t, () => ({where: ['Generate', '生成'], message: status.firstChild?.textContent}), {className: 'fv-status-issue'});
+ // The run's diagnostic report: errors beside it go the report route instead of the feedback form.
+ const reportRoute = {has: () => progress.hasReport(), download: () => progress.downloadReport(), fetch: progress.fetchReport, version: productVersion};
+ const statusIssue = issueButton(t, () => ({where: ['Generate', '生成'], message: status.firstChild?.textContent}), {className: 'fv-status-issue', route: reportRoute});
function fault(text) { status.dataset.error = 'true'; status.textContent = text; status.append(statusIssue); }
const stats = el('div', null, 'fv-stats'), budget = el('div', '', 'fv-budget'), links = el('div', null, 'fv-result-links');
+ // New text in the status line replaces the report card under the result.
+ const statusWatch = new MutationObserver(() => { if (!status.textContent.trim()) return; hideReportTip(links.querySelector('.fv-actions')); hideReportTip(status); });
+ statusWatch.observe(status, {childList: true, characterData: true, subtree: true});
+ cleanup.push(() => statusWatch.disconnect());
stats.hidden = true;
const metrics = [], metricLabels = [];
for (const label of [t('Generation', '生成用时'), t('Total time', '总用时'), t('Peak VRAM', '最高显存'), t('Peak RAM', '最高内存')]) { const box = el('div', null, 'fv-stat'), n = el('strong', '—'), caption = el('span', label); box.append(n, caption); stats.append(box); metrics.push(n); metricLabels.push(caption); }
@@ -1303,7 +1309,7 @@ export function openStudio(node, {extendFrom = null} = {}) {
const sharedGpuNote = el('div', '', 'fv-note'); sharedGpuNote.hidden = true;
const encoderNote = el('div', '', 'fv-note'); encoderNote.hidden = true;
output.append(status, reuseRow, trimNote, memoryNote, thermalNote, sharedGpuNote, encoderNote, links, stats, budget, progress.stall, progress.report, prewarm);
- const failure = createErrorPanel(t); output.append(failure.element);
+ const failure = createErrorPanel(t, reportRoute); output.append(failure.element);
// With the picture, the result's actions and numbers form one block, centred below the header.
output.append(el('div', null, 'fv-preview-end'));
if (node.freevideoFailure) failure.show(node.freevideoFailureReport || node.freevideoFailure, false);