mirror of
https://github.com/openclaw/openclaw.git
synced 2026-08-02 09:01:33 +00:00
fix(ui): recover sessions and dashboards after prolonged outages (#115654)
* fix(ui): recover long-running sessions and dashboards * fix(ui): expose browser-safe gateway timers * refactor(ui): keep browser timer surface minimal * refactor(gateway): extract pending request state * fix(ci): refresh browser runtime and format baseline * fix(ci): exclude generated plugin outputs from targeted lint * fix(ui): bound long-running connection and pane lifecycles * refactor(ui): split long-running lifecycle regression coverage * fix(ui): bound long-running media and lint ownership * fix(security): preserve explicit workspace disable denylist * fix(ci): preserve plugin manifest fallback lint
This commit is contained in:
committed by
GitHub
parent
1ab48a71df
commit
fde4658bf6
@@ -28,6 +28,7 @@ import {
|
||||
resolveLocalHeavyCheckEnv,
|
||||
} from "./lib/local-heavy-check-runtime.mjs";
|
||||
import { runManagedCommand } from "./lib/managed-child-process.mjs";
|
||||
import { listGeneratedExtensionAssetSources } from "./lib/static-extension-assets.mjs";
|
||||
import { createSparseTsgoSkipEnv } from "./lib/tsgo-sparse-guard.mjs";
|
||||
|
||||
const NPM_LOCK_POLICY_PATH_RE =
|
||||
@@ -74,6 +75,7 @@ const MACOS_APP_CI_PATH_RE =
|
||||
/^(?:apps\/(?:macos|macos-mlx-tts|shared|swabble)\/|Swabble\/|scripts\/(?:codesign-mac-app|create-dmg|notarize-mac-artifact|package-mac-app|package-mac-dist)\.sh$|scripts\/lib\/(?:plistbuddy|swift-toolchain)\.sh$|test\/scripts\/(?:codesign-mac-app|create-dmg|notarize-mac-artifact|package-mac-app|package-mac-dist)\.test\.ts$)/u;
|
||||
let corepackPnpmShimDir;
|
||||
let corepackPnpmShimCleanupRegistered = false;
|
||||
let cachedGeneratedExtensionAssetPaths;
|
||||
let npmLockPackageDirsForChangedPaths;
|
||||
|
||||
async function ensureChangedCheckRuntimeDependencies(paths) {
|
||||
@@ -421,6 +423,11 @@ async function runChangedCheckViaCrabbox(argv = [], env = process.env) {
|
||||
export function createChangedCheckPlan(result, options = {}) {
|
||||
const commands = [];
|
||||
const baseEnv = createChangedCheckChildEnv(options.env ?? process.env);
|
||||
const generatedExtensionAssetPaths = result.paths.some((changedPath) =>
|
||||
LINTABLE_EXTENSION_PATH_RE.test(changedPath),
|
||||
)
|
||||
? (cachedGeneratedExtensionAssetPaths ??= new Set(listGeneratedExtensionAssetSources()))
|
||||
: new Set();
|
||||
const add = (name, args, env) => {
|
||||
if (!commands.some((command) => command.name === name && sameArgs(command.args, args))) {
|
||||
commands.push({ name, args, ...(env ? { env } : {}) });
|
||||
@@ -437,9 +444,18 @@ export function createChangedCheckPlan(result, options = {}) {
|
||||
};
|
||||
const addTypecheck = (name, args) => add(name, args, createSparseTsgoSkipEnv(baseEnv));
|
||||
const addLint = (name, args) => add(name, args, baseEnv);
|
||||
const addTargetedLint = (createCommand, lintablePathRe, fallbackName, fallbackArgs) => {
|
||||
const targets = result.paths.filter((changedPath) => lintablePathRe.test(changedPath));
|
||||
const otherPaths = result.paths.filter((changedPath) => !lintablePathRe.test(changedPath));
|
||||
const addTargetedLint = (
|
||||
createCommand,
|
||||
lintablePathRe,
|
||||
fallbackName,
|
||||
fallbackArgs,
|
||||
ignoredPaths,
|
||||
) => {
|
||||
const candidatePaths = ignoredPaths
|
||||
? result.paths.filter((changedPath) => !ignoredPaths.has(changedPath))
|
||||
: result.paths;
|
||||
const targets = candidatePaths.filter((changedPath) => lintablePathRe.test(changedPath));
|
||||
const otherPaths = candidatePaths.filter((changedPath) => !lintablePathRe.test(changedPath));
|
||||
const targetedCommands = [];
|
||||
|
||||
for (let offset = 0; offset < targets.length; offset += TARGETED_LINT_PATH_LIMIT) {
|
||||
@@ -685,12 +701,24 @@ export function createChangedCheckPlan(result, options = {}) {
|
||||
addLint("lint core", ["lint:core"]);
|
||||
}
|
||||
if (lanes.extensions || lanes.extensionTests) {
|
||||
addTargetedLint(
|
||||
createTargetedExtensionLintCommand,
|
||||
LINTABLE_EXTENSION_PATH_RE,
|
||||
"lint extensions",
|
||||
["lint:extensions"],
|
||||
);
|
||||
// Generated plugin outputs have their own asset-integrity gate and are
|
||||
// intentionally ignored by oxlint; manifests still need full-lane fallback.
|
||||
if (
|
||||
!result.paths.some((changedPath) => generatedExtensionAssetPaths.has(changedPath)) ||
|
||||
result.paths.some(
|
||||
(changedPath) =>
|
||||
getChangedPathFacts(changedPath).surface === "extension" &&
|
||||
!generatedExtensionAssetPaths.has(changedPath),
|
||||
)
|
||||
) {
|
||||
addTargetedLint(
|
||||
createTargetedExtensionLintCommand,
|
||||
LINTABLE_EXTENSION_PATH_RE,
|
||||
"lint extensions",
|
||||
["lint:extensions"],
|
||||
generatedExtensionAssetPaths,
|
||||
);
|
||||
}
|
||||
}
|
||||
if (lanes.tooling || lanes.liveDockerTooling) {
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user