fix(studio): three inputs that write the host and had no action name now have one, which the census invariants step, never reached while the tests failed before it, refuses to pass without: the plugin paste field, the market cache retry and the onboarding start button

This commit is contained in:
yhh committed 2026-11-07 04:23:12 -08:00
1 parent 7586f9e785
commit 18015b1faf
4 files changed
+6 -5

No files matched your search

@@ -244,6 +244,7 @@ function PluginInput({ port, onClose, onInstalled, updating, source, onApplying,
className="paste"
aria-labelledby={sourceLabel}
data-action-keydown="extensions.inspect"
data-action-change="extensions.inspect"
rows={3}
autoFocus
value={text}
+2 -2
View File
@@ -162,7 +162,7 @@ export function Market({ port, account, onInstalled, onViewInstalled, onSignIn }
</div>}
</div>
)}
{cached && !error && <CacheNotice cache={cached} action="market.retry" onRetry={() => { panel.current?.focus(); load(0, true); }} />}
{cached && !error && <CacheNotice cache={cached} onRetry={() => { panel.current?.focus(); load(0, true); }} />}
{rows === null && !error && <div className="empty" role="status">{t("common.loading")}</div>}
{rows?.length === 0 && !error && <div className="empty">{t(pinned ? "ext.no_pinned_packages_found_turn" : "ext.no_matching_packages")}</div>}
<ul className="mkt-list">
@@ -342,7 +342,7 @@ function Entry({ port, account, slug, inspect = false, onBack, onInstalled, onVi
</button>
)}
</div>
{d.cache && <CacheNotice cache={d.cache} action="market.detail-retry" onRetry={() => { panel.current?.focus(); setAttempt((n) => n + 1); }} />}
{d.cache && <CacheNotice cache={d.cache} detail onRetry={() => { panel.current?.focus(); setAttempt((n) => n + 1); }} />}
{p.summary && <p className="mkt-sum">{p.summary}</p>}
{p.description && <p className="mkt-desc">{p.description}</p>}
{!d.pinned && !current && (
+2 -2
View File
@@ -7,7 +7,7 @@ function savedAt(iso: string): string {
return d.toLocaleString(current() === "zh" ? "zh-CN" : "en", { month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" });
}
export function CacheNotice({ cache, action, onRetry }: { cache: MarketCache; action: string; onRetry: () => void }) {
export function CacheNotice({ cache, detail, onRetry }: { cache: MarketCache; detail?: boolean; onRetry: () => void }) {
const when = savedAt(cache.cachedAt);
return (
<div className="find" data-cached="" role="status">
@@ -18,7 +18,7 @@ export function CacheNotice({ cache, action, onRetry }: { cache: MarketCache; ac
: t("ext.the_community_market_is_not", { when })}
</span>
<div className="acts">
<button className="act" data-action={action} onClick={onRetry}>{t("common.retry")}</button>
<button className="act" data-action={detail ? "market.detail-retry" : "market.retry"} onClick={onRetry}>{t("common.retry")}</button>
</div>
</div>
);
+1 -1
View File
@@ -374,7 +374,7 @@ export function Onboarding({ port, setup, onDone, onSkip, project }: Props) {
</div>
{err && <div className="onb-err" role="alert">{err.text}</div>}
<div className="onb-acts">
<button className="btn onb-go" data-primary disabled={busy || !kind || !model} onClick={() => void start()}>
<button className="btn onb-go" data-primary data-action="onboarding.start" disabled={busy || !kind || !model} onClick={() => void start()}>
{t(busy ? "common.saving_2" : "onboarding.continue")}
</button>
<button type="button" className="onb-skip" data-action="onboarding.back" disabled={busy} onClick={() => go("connect", true)}>{t("onboarding.previous_step")}</button>