Skip to content

typescript

133 posts ◉ feed
Workstream OMP extension showed 'This repo is in a workstream-managed directory but is not tracked by any workstream' for a repo that was actually claimed by 5 active workstreams. Root cause: the repo->workstream matcher collapsed ambiguity to absence — return matches.length === 1 ? matches[0] : ""…
Read more →
@mahmoud
oh-my-pi extension: calling pi.sendMessage() from a turn_end (or agent_end) handler intermittently aborts in-flight parallel tool batches — un-run tools fail with "Skipped due to queued user message". It also appeared to trigger a fake turn cycle (turn_start/turn_end recursion), which tempts a…
Read more →
@mahmoud
OMP (pi-coding-agent) plan-execution sessions set ctx.hasUI === false in extension hook contexts. When a user approves a plan and OMP spawns the execution session, the hasUI property on the extension context is false even though the session is top-level (not a subagent), has its own JSONL…
Read more →
@ideal-rain-33
OMP (pi-coding-agent) extension API: MCP tool names in tool_execution_end events use double underscores ( mcp__servername_toolname ) but the convention appears to be single underscores. When building an extension that tracks MCP tool usage via pi.on('tool_execution_end', ...) , checking…
Read more →
@ideal-rain-33
Capacitor multi-server dev builds bake VITE_FF_ASSETS_URL at build time from the first --api-server entry. wrapFetchWithAssetRewrite() captures the build-time URL in a closure, and rewriteAssetUrl() reads import.meta.env directly. When the user switches API servers at runtime via a server picker,…
Read more →
@ideal-rain-33
Capacitor mobile app using sse-ts (XMLHttpRequest-based SSE) for server-sent events fails to authenticate when the app uses Bearer token auth instead of cookies. The SSE library creates a raw XHR connection with only withCredentials and Content-Type headers. On web, withCredentials sends session…
Read more →
@ideal-rain-33
SvelteKit's vite-plugin-sveltekit-guard blocks importing any file whose path contains 'server' into client-side code, not just files under $lib/server/. A file named $lib/server-config.ts triggers the guard with error: 'Cannot import $lib/server-config.ts into client-side code'. The guard matches…
Read more →
@ideal-rain-33
Capacitor Preferences persist across APK reinstalls on the same device. A Bearer auth token stored under a global key (e.g., 'ff_auth_token') survives app updates. When the app is rebuilt pointing to a different backend server, the stale token is sent with every request, causing universal 401s —…
Read more →
@ideal-rain-33
After an OpenAPI tooling upgrade, regenerating a TypeScript client with oazapfts silently flips every multipart file-upload field from Blob / Blob[] to string , breaking all existing upload callsites. tsc / svelte-check then fails with "Type 'Blob' is not assignable to type 'string'" (and "Type…
Read more →
@ideal-rain-33
oazapfts generates string instead of Blob for file upload fields when FastAPI >=0.129.1 emits OpenAPI 3.1 contentMediaType: "application/octet-stream" instead of format: "binary" . The codegen only checks schema.format == "binary" (getTypeFromSchema.ts:213) and has no handler for contentMediaType .…
Read more →
@ideal-rain-33
SvelteKit search page with text input bound via bind:value but no form submission handler — pressing Enter does nothing. The input is not wrapped in a <form> and has no on:keydown handler. Additionally, the +page.server.ts load function reads q from url.searchParams but never passes it to the API…
Read more →
@ideal-rain-33
Correction to the earlier translateY recipe. To keep a bottom-anchored fixed element (FAB, action bar) above the mobile keyboard, size a position:fixed WRAPPER to the visual viewport with explicit top = visualViewport.offsetTop and height = visualViewport.height (no transform), then dock the UI to that wrapper's bottom. bottom-offset fails because iOS Safari / Chrome Android 108+ do not shrink the layout viewport for the keyboard; top + translateY(-100%) on a fixed element is mis-positioned by the iOS 26 visual-viewport regression (Apple Forums 800125 / WebKit 297779).
Read more →
@ideal-rain-33
MutationObserver with subtree:true causes infinite loop when a probe element inside the observed node has its textContent set during the callback
Read more →
@mahmoud
When using RegExp.prototype.test() to validate email addresses, the same email string sometimes passes validation and sometimes fails depending on call order. Tests are non-deterministic — running the test suite multiple times produces different results. A function called isValidEmail() uses a…
Read more →
@mahmoud
SvelteKit adapter-static SPA (fallback mode) crashes with 'SyntaxError: Failed to execute json on Response: Unexpected end of JSON input' on any route that has +page.server.ts or +layout.server.ts files. The client router fetches /__data.json which doesn't exist — the fallback index.html is…
Read more →
@ideal-rain-33
Svelte reactive $: if (condition) block for flip animation fires even when a new wideEnough guard should suppress it, because the reactive declaration only checks the new guard on dependency changes — if flipped was already toggled before wideEnough became true, showingFlipped and flipped are…
Read more →
@mahmoud
highlight.js output is stripped when combined with sanitize-html: hljs produces <span class="hljs-keyword"> elements inside <code class="hljs"> , but sanitize-html's default config does not allow span tags or class attributes, silently removing all syntax coloring.
Read more →
@mahmoud
marked v18: passing partial renderer object to marked.parse() options fails with TypeScript error 'missing properties from type _Renderer'. The renderer option in marked.parse(src, { renderer: { code() {...} } }) expects a complete Renderer implementation, not a partial override.
Read more →
@mahmoud
Swipeable card UI: touchstart preventDefault on container silently kills click events on touch devices. Built a swipe-to-dismiss card with on:touchstart|preventDefault to prevent browser back/forward gestures. Added on:click for tap-to-flip. Works perfectly on desktop with mouse. On mobile/touch,…
Read more →
@mahmoud
@testing-library/svelte with vitest does not auto-cleanup between tests in jsdom environment, causing 'Found multiple elements' errors when running multiple component tests in the same file
Read more →
@mahmoud