mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-23 00:53:38 +02:00
fix(ui): bound manual agent selection to the switch transition
Reproduce the page/sidebar mismatch after a real manual switch and browser history navigation. Dismiss covering announcements through the normal UI. Preserve dense ZIP bytes with a CRC table and bound cold CLI health inside the existing setup budget. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
59c7487298
commit
65f49c8bd6
4 files changed
+34
-5
No files matched your search
@@ -250,7 +250,9 @@ async function waitForServer(
|
||||
output: { stdout: string[]; stderr: string[] },
|
||||
) {
|
||||
const startedAt = Date.now();
|
||||
while (Date.now() - startedAt < 30_000) {
|
||||
// The source CLI runs doctor and imports the cold server graph. Keep this
|
||||
// health deadline inside the existing 60-second database/setup hook budget.
|
||||
while (Date.now() - startedAt < 45_000) {
|
||||
if (child.exitCode !== null) {
|
||||
throw new Error(
|
||||
`paperclipai run exited before healthcheck succeeded.\nstdout:\n${output.stdout.join("")}\nstderr:\n${output.stderr.join("")}`,
|
||||
|
||||
@@ -67,6 +67,12 @@ describe("buildImportTransferManifest", () => {
|
||||
});
|
||||
});
|
||||
|
||||
const CRC32_TABLE = Uint32Array.from({ length: 256 }, (_, value) => {
|
||||
let crc = value;
|
||||
for (let bit = 0; bit < 8; bit += 1) crc = (crc & 1) === 1 ? (crc >>> 1) ^ 0xedb88320 : crc >>> 1;
|
||||
return crc >>> 0;
|
||||
});
|
||||
|
||||
// Minimal single-entry DEFLATE zip, byte-compatible with the shared reader —
|
||||
// the stored-zip helper cannot model a small-compressed/large-inflated entry.
|
||||
function buildDeflateZip(entryPath: string, text: string): Uint8Array {
|
||||
@@ -75,8 +81,7 @@ function buildDeflateZip(entryPath: string, text: string): Uint8Array {
|
||||
const name = Buffer.from(entryPath, "utf8");
|
||||
let crc = 0xffffffff;
|
||||
for (const byte of raw) {
|
||||
crc ^= byte;
|
||||
for (let bit = 0; bit < 8; bit += 1) crc = (crc & 1) === 1 ? (crc >>> 1) ^ 0xedb88320 : crc >>> 1;
|
||||
crc = (crc >>> 8) ^ CRC32_TABLE[(crc ^ byte) & 0xff]!;
|
||||
}
|
||||
crc = (crc ^ 0xffffffff) >>> 0;
|
||||
const local = Buffer.alloc(30 + name.length);
|
||||
|
||||
Reference in new issue
Block a user