Repository navigation
fix: allow replace all with an empty replacement - #3048
Merged
bajrangCoder merged 2 commits intoNov 13, 2026
Merged
bajrangCoder merged 2 commits into
bajrangCoder merged 2 commits into
Conversation
Search in files returned early from replaceAll() when the replace field was empty, so there was no way to delete every match. Both the worker and the native replace already handle an empty string, so only the search query is required now. Fixes Acode-Foundation#3044
Contributor
[Medium impact] The PR appears safe to merge; no new actionable issues were found. SummaryAllows “replace all” to delete matches with an empty replacement.
The previous unnumbered finding is fixed: Reviews (3) · Last reviewed commit: "fix: keep empty replacement text for fil..." · Reviewed by Greptile |
openFile ignored supplied text when it was an empty string, so a closed file whose whole content was replaced with "" was reloaded from disk.
AuDevTist1C
added a commit
to AuDevTist1C/Acode
that referenced
this pull request
Nov 27, 2026
…Foundation#3125) * initial commit * fix: dev server and plugin compatibility * feat/ios * Merge pull request #6 from RohitKushvaha01/main refactor: kotlin * feat: ios terminal * fix: ui issues and ios plugin installation * fix: revert config base url * fix: ios plugin page loading * fix(console): restore isolated worker execution by default (#7) Restore upstream behaviour from Acode-Foundation/Acode#2808, which was reverted as part of the iOS terminal work. The console runs in the isolated worker by default, page execution is opt-in and labelled "Page (unsafe)", and the standalone menu console always uses the worker. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * fix(ios): native host terminal server and PTY reconnect (#8) * fix(ios): serve terminals from the host instead of AXS in the emulator On iOS, AXS ran inside the Linux emulator, so every keystroke went through emulated sockets, epoll, tokio threads and a PTY. Terminals broke after the app was backgrounded because the emulator's socket restart hooks were never called. - Add a tty driver (Bridge/AlpineTerminal.c) that connects guest /dev/pts slaves directly to Swift via pty_open_fake, as iSH does. Only bash runs emulated; job control, termios and SIGWINCH keep working. - Serve the AXS HTTP/WebSocket API (/terminals, resize, terminate, status, execute-command) from Swift on 127.0.0.1:8767 so the JS terminal and plugins are unchanged. Output is coalesced like AXS, 256 KB scrollback is replayed on reattach, and writers are paused when the client falls behind. - Call sockrestart on suspend/resume and restart the listener on foreground. - Run init-alpine.sh --prepare once per boot instead of per AXS start, check required packages with one apk call, and skip the Android-only storage check in bash that forked two subshells per command. - Stream language server output directly from the pipe on its own queue instead of through AlpineRuntime.queue. - Fix LocalHTTPServer loopback listeners failing with EINVAL, which also affected EmbeddedProxyServer. - Remove stopped spawnStream servers instead of keeping them forever. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(terminal): reattach to the PTY after an unexpected socket drop A dropped WebSocket (e.g. after the app is suspended) closed the terminal tab even though the shell was still running. Retry the same session with backoff; the server replays recent output, so the screen is reset first. The tab only closes once the session is really gone. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(terminal): address review on backpressure, reconnect and execute-command - Park congested guest writers in C with the emulator's wait_for instead of an NSCondition in Swift. Pending guest signals (Ctrl-C, SIGKILL from unmount) now interrupt the wait with EINTR before any data is accepted, and closing a terminal releases waiting writers. - Keep the tab when reconnect attempts run out: mark it disconnected and retry on the next keypress or app resume. Only a process exit or an explicit close ends the session. - Run /execute-command on an 80x24 PTY like AXS, answer when the shell exits, return 400 for a missing cwd, and apply the 30 s deadline until the response is sent, terminating the session's process group on timeout. - Add AlpineTerminalServerTests (congested writer vs Ctrl-C, execute-command PTY and deadline) and extend the interaction test for kept tabs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * fix(ios): app paths and Alpine exec; feat(lsp): project-wide TypeScript worker with progress (#11) * fix(ios): normalize app paths and keep Alpine exec from closing sibling fds - FileService: stop appending a second "/" to FileManager directory URLs, so dataDirectory/cacheDirectory/documentsDirectory/applicationDirectory match the single-slash URLs that file entries resolve to. - getVirtualPath: alias the built-in Terminal Public and iOS Documents roots (longest match wins), so File Info, tab titles, recents and the LSP panel show short paths instead of the raw sandbox container path. - openFolder: offer "Open in Terminal" on iOS and map Terminal Public to /public inside Alpine. - ios-linuxkit exec: give the exec'ing task a private fd table before close-on-exec, like Linux unshare_files(). Node's tsc launcher execs while V8 worker threads wait in epoll_wait on a close-on-exec fd; closing it under them made libuv abort with "Assertion failed: errno == EINTR". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * style: wrap ASSETS_DIRECTORY assignment per Biome Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * feat(lsp): project-wide TypeScript web worker with work-done progress The built-in TypeScript worker only saw open tabs and bundled lib files. It now builds a project for every listable workspace folder: - Reads tsconfig.json/jsconfig.json (include/exclude, extends, paths) or infers a project from the folder's source files. - Serves the compiler from a virtual file system backed by the host; unknown files and directories load in the background and the program is rebuilt until imports, including node_modules types, resolve. - Definitions, references, rename, code actions, implementations and type definitions return locations in unopened files. - Files outside any folder, unsaved files and FTP/SFTP folders keep the previous single-file analysis. Adds go to implementation/type definition, and standard LSP work-done progress: workers can create tokens after `initialized`, and the worker transport acknowledges window/workDoneProgress/create like the WebSocket transport. Project loading reports scanned folder and file counts. * fix(lsp): address TypeScript project and iOS terminal path review findings - Keep per-file versions increasing across invalidation, so result positions are never computed from text that predates a reload. Closing an edited file no longer makes definitions and rename point at stale offsets. - Locate newly opened files through fresh listings: re-list the nearest known folder and walk down. Paths still come from provider listings, so opaque content:// URIs map correctly. - Give file: folders their real path, so `extends` and node_modules above the folder resolve through readable parents; other providers keep isolated roots. Persisting config errors are logged. - Enumerate tsconfig includes only over folders the budgeted crawl listed, and reuse in-flight listings instead of loading twice. - Claim documents only when the project's options accept them, so JavaScript in a project without allowJs uses single-file analysis. - Convert iOS terminal folders without decoding already-decoded file URLs; decode Alpine URLs exactly once per segment. * fix(lsp): keep TypeScript project membership consistent - Rebuild inferred projects' file lists from current folder listings on every refresh, so files created after loading stay in references and rename after their tabs close. - Accept JavaScript with TypeScript's effective allowJs, so checkJs alone enables it while an explicit allowJs: false still excludes it. - Assign files to the deepest owning workspace folder regardless of the order folders were added. - Keep decoded file: folder names as-is in progress labels and decode other providers' names safely, so names with "%" no longer abort loading. --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> * fix: ios terminal (#12) * fix: ios terminal * fix: ios terminal --------- Co-authored-by: Ajit Kumar <dellevenjack@gmail> * fix: ios tests, startup (#15) * fix: ios tests, startup * Potential fix for pull request finding 'CodeQL / Bad HTML filtering regexp' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * Potential fix for pull request finding 'CodeQL / Bad HTML filtering regexp' Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * fix: quick toolbar * fix: ios ads --------- Co-authored-by: Ajit Kumar <dellevenjack@gmail> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * fix: ios ads * chore: sync commits from Acode main since a63983fd (#16) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: curly72alpha <curly72alpha@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: curly72alpha <105135880+curly72alpha@users.noreply.github.com> Signed-off-by: dependabot[bot] <support@github.com> * fix: ios fullscreen behaviour (#17) * fix: ios fullscreen behaviour * fix(ios): preserve fullscreen compatibility and Back behavior - Restore iframe fullscreen support and native ownership tracking. - Apply fullscreen CSS and override inline sizing while preserving plugin styles. - Consume Back when dismissing native dialogs to prevent callback fallthrough. - Keep main-app fullscreen edge-to-edge without browser presentation. --------- Co-authored-by: Ajit Kumar <dellevenjack@gmail> * perf: faster app startup (#18) * perf: faster app startup - Reveal the app after its first rendered frame instead of a fixed 500 ms delay - Run independent native startup calls and the purchase check in parallel - Bound the startup purchase check so an unresponsive store cannot hold the splash screen - Load the terminal, run/preview and mime-types code on demand - Target the oldest supported WebView/Safari instead of ES2015 - Cache the native encoding list, skip load-time validation of built-in themes - Rebuild the command keymap lazily and apply it once per burst - Load the built-in sidebar app chunks in parallel - Fix the owned plugins list crash and the unhandled sponsor form cancellation * perf: load core-js polyfills once native.js already installs core-js/stable and boot.js always loads it before main.js, so main.js no longer bundles a second copy (-113 KB). * fix: typos * perf: stop plugins and file I/O from slowing startup - Decode and encode UTF-8 in the WebView instead of round-tripping base64 through native; invalid UTF-8, lone surrogates and other charsets still use native so behaviour is unchanged (BOM kept on Android, stripped on iOS) - Format Android internal file URLs in JS when the result provably matches native, skipping a resolve round trip per read and per plugin path - Load plugins with fewer native round trips: no exists() check for main, and the cache file and plugin token are prepared while the script loads - Open files shared from other apps after a short plugin grace period instead of waiting for every plugin; files a plugin may handle (remembered handler extensions, documents) still wait as before * perf: load LSP client, Emmet and developer tools after startup - Move the language-server client (clientManager, editor features, @codemirror/lsp-client, marked, protocol types) into a chunk that loads only when an enabled server handles an open file, after the editor is visible; the plugin-facing registry and diagnostics UI stay in main.js - Load Emmet through a compartment only when a file uses an Emmet syntax - Start developer tools (eruda) after the editor is visible and replay the console output and errors captured during startup into its console - main.js: 1,895 KB -> 1,515 KB * fix: keep terminal focused during touch-and-hold selection Android's native long-press fires after our tap-hold timer and blurs the terminal, which closed the keyboard, resized the grid and made the selection menu disappear and reappear. Refocus in the same task so the IME never hides. * fix: address review findings in startup changes - Hide banners when a Pro purchase is confirmed after the startup check timed out, as purchase restoration does - Clear the cached Pro flag when the store reports no purchase, even if the result is too late to change this session - Wait for plugins before opening shared files until a full plugin load has recorded which extensions plugins handle (first launch after updating) - Cancel a pending developer tools initialization when developer mode is turned off, so Eruda does not activate afterwards - Move the startup purchase check into lib/verifyProPurchase.js * fix: record plugin handler history only after slow plugins finish A plugin that outlives the 15 s load timeout keeps loading in the background and may register a file handler later. Wait for those loads to settle before recording which extensions plugins handle; one that never finishes leaves the history unset, so shared files keep waiting for plugins. * ci: move native builds out of per-PR CI (#19) * ci: move native builds out of per-PR CI Match upstream Acode: ci.yml keeps only fast checks (spelling, Biome, unit tests, typecheck, translations). Native tests move to a new native-tests.yml that runs only the platform a PR touches, plus a daily and manual full run. APKs are built only by nightly and on-demand preview releases. Also select the Android edition via androidPackageId (npm pkg set name was a no-op, so the free build was actually paid) and install the required Android SDK packages in the nightly build. * fix: CI spelling errors and sdkmanager path sdkmanager is not on PATH on GitHub's Ubuntu runners, so call it from ANDROID_HOME. Allow Apple's udid in typos and fix the onSucess typo. * fix: use android-37.0 SDK platform package name * test: drop removed ServiceName.fromKey assertion fromKey was removed from ServiceName; Bridge resolves services through the registry map, so the test now only checks keys are unique. * Fix/custom tabs (#20) * fix: custom tabs and attachements * fix: ios related issues * fix: ios issues --------- Co-authored-by: Ajit Kumar <dellevenjack@gmail> * chore: sync Acode main changes (644df30a..ef7f3265) (#24) * chore(deps): bump ghcr.io/devcontainers/features/node (#2961) Bumps ghcr.io/devcontainers/features/node from 2.1.0 to 2.1.1. --- updated-dependencies: - dependency-name: ghcr.io/devcontainers/features/node dependency-version: 2.1.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> (cherry picked from commit 644df30a1094b178a582b3eeec609d446bd2c2d4) * chore: fix Discord badge URL in README (#2965) Updated Discord badge URL to a new endpoint. (cherry picked from commit 326cf0df826d4a4a22145df52ff318bca0548c74) * feat(browser): set a default device size for the in-app preview (#2966) * refactor(browser): keep a list of devices in the emulator device list * refactor(browser): register each device when added to the list * feat(browser): apply the saved default preview size once layout is ready * feat(browser): save and restore a default device preview size * feat(browser): add "Set as Default" and "Clear Default" menu items * feat(browser): handle "Set as Default" and "Clear Default" actions * feat(browser): show default menu items only while Devices mode is on * feat(browser): open the preview in Devices mode when a default is set * feat(browser): restore the default preview mode on startup * refactor(browser): allow applying desktop mode without reloading * refactor(browser): make the reload in setDesktopMode optional * fix(browser): apply saved desktop mode before the first load to avoid a reload * fix(browser): only apply dimensions after layout, not desktop mode * fix(browser): re-fit saved presets to the current screen on restore * fix(browser): reload once after the saved size is applied * fix(browser): don't resize the webview before the emulator is set up * fix(browser): add reloadAfterLayout helper, only when a page was requested * fix(browser): show "Clear Default" only when a default is saved * fix(browser): refresh default menu items after Set as Default * fix(browser): refresh default menu items after Clear Default (cherry picked from commit f432f33981a0ee5518ecc7dab1772b4603a82d56) * chore: Update biome.json (cherry picked from commit 3148accde57f18a7d6e81f012b8c049488a881e2) * fix: fmt (cherry picked from commit ad8b40fddd023337b8253c8e7f05704a0485252e) * refactor(file-browser): Deduplicate `renameFile` flow and unify error handling (#2958) - Unify post-rename side effects (recents update, editor tab URI sync, tree state, success toast, reload) across standard and Termux filesystem paths. - Wrap standard filesystem rename execution inside the master try-catch block to gracefully capture errors. (AI generated commit message) (cherry picked from commit a8dae47c4238974abd7140239bf69ecdddd89066) * feat(editor): richer JS/TS highlighting for JSDoc and methods (#2971) * feat(editor): highlight JSDoc inside JS/TS block comments * feat(editor): colour JS/TS methods as functions and refine JSDoc highlighting - Tag class and interface method names as function definitions and give method calls, method definitions and function declaration names the function colour in all built-in themes. - Bump @lezer/highlight to 1.2.5, which fixes the precedence of context-specific highlight rules added through parser props. - Leave JSDoc braces and punctuation as comment text, handle escaped quotes in types and quoted brackets in optional defaults, and skip /*** comments like TypeScript does. - Add unit tests for JSDoc and method highlighting. * fix(themes): colour properties differently from methods Themes that reused the function colour for properties made this.foo look like a method call. Give properties the palette's property colour where it has one (Tokyo Night, Catppuccin) and the foreground otherwise, and stop colouring Noctis Lilac property definitions as functions. * fix(themes): colour JS properties apart from methods without affecting other languages propertyName is shared by CSS properties, JSON/YAML keys, Go/C++ fields and (through attributeName) HTML attributes, so giving it its own colour moved those away from how VS Code colours them. Restore the themes' propertyName colour and tag JS/TS property names with memberProperty, a sub-tag of propertyName that falls back to it in themes that don't style it. Built-in themes colour it like their VS Code counterparts. (cherry picked from commit eb7cf40c4bddbc4f291103f849414f137eff0771) * Update _typos.toml (cherry picked from commit 09b035d41b650d16c93658e2d83793e48ccc1800) * chore(modes): drop legacy modes provided by the Additional Language Modes plugin (#2973) Stop registering the legacy stream-mode Clojure, ClojureScript, edn, Gas, Kotlin, LaTeX, sTeX, Lua and Swift modes, and stop HTML claiming .hbs and .handlebars, so the acode.additional.langmodes plugin's Lezer modes take their canonical names and file extensions. (cherry picked from commit ef7f32656a5c4216209ac7e8d24e81bb1564ff8b) --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Emmanuel Lobo <76094069+UnschooledGamer@users.noreply.github.com> Co-authored-by: Aadin <hey.itsaadin@gmail.com> Co-authored-by: AuDevTist1C <114492072+AuDevTist1C@users.noreply.github.com> * fix: add missing ArrayList import in Emulator.java (#26) * test: add ftp, sftp and file operation tests (#28) Co-authored-by: Emmanuel Lobo <76094069+UnschooledGamer@users.noreply.github.com> * fix: prevent crash when opening file:// links from LSP tooltips (#2977) Open file:// links in LSP hover/signature docs in the editor, and guard the native openInBrowser against file URIs and launch failures. (cherry picked from commit d755c315cb760a964a89b136f4ae244ef89db0f8) * update: es-sv (#2974) * update: es-sv * Fix errors detected by greptile * fix: fmt --------- Co-authored-by: Raunak Raj <71929976+bajrangCoder@users.noreply.github.com> (cherry picked from commit 579af33f9ee584c5f4ad9e60c0f4a90346aa3b5b) * feat(modes): let plugin modes reuse another mode's formatter (#2976) * feat(modes): let plugin modes reuse another mode's formatter Add a formatAs option to editorLanguages.register so a plugin mode (e.g. json-bedrock) formats with the formatter and Prettier parser of an existing mode (e.g. json) when the user hasn't picked one for it. editorLanguages.register now forwards its options to addMode, and Mode ignores malformed options instead of throwing. * fix(modes): resolve formatAs aliases and label the inherited choice Resolve formatAs through the mode list so an alias (e.g. json5) finds the base mode's saved formatter and Prettier parser. For modes with formatAs, the picker's unset option now names the inherited formatter (e.g. "Prettier (JSON)") instead of "None". * fix(settings): refresh inherited formatter label when the picker opens (cherry picked from commit 5323b5879f60605195b259fe38f35e2b7c273c6e) * chore(deps): bump @lezer/common to 1.5.4 @lezer/common 1.5.4 fixes the look-ahead of the anonymous nodes that balance long repeats (lezer/common!11). Before it, incremental parses never reused them and re-tokenized everything before an edit, so a keystroke's reparse grew with its position in the file: CodeMirror's language field hit its 20ms budget on every key deep in large files (369ms vs 0.5ms for an edit at line 100k of a 4MB file in plain Lezer). Bumped in dependencies and overrides, so every package uses this copy. (cherry picked from commit 88ddc2740ac307acb2410ef26094d7ff163b5caa) * feat(markdown): render mermaid diagrams with pele (#2987) * feat(markdown): render mermaid diagrams with pele Replace the mermaid package with pele, a small synchronous renderer that loads each diagram type on demand and themes via CSS variables. * fix(markdown): map pele colors to defined theme variables (cherry picked from commit b08fd0bfc27abd6c58c576d959c607a7b6b69c31) * feat(editor): add experimental canvas renderer (#2988) * build: link @acode/canvas-view from a local checkout Resolve canvas-view's imports (and their types) from Acode's own node_modules, so CodeMirror's state and view stay single instances. * feat(settings): add editor renderer setting Renderer: DOM (default) or Canvas (experimental), applied on reload. * feat(editor): add experimental canvas renderer With editorRenderer set to canvas, editors are @acode/canvas-view CanvasViews. Settings that the DOM editor applies through extensions (line numbers, folding, guides, rainbow brackets, whitespace, wrapping, scroll past end, RTL) become canvas options, kept in sync on changes. Themes map to a CanvasThemeSpec (config colors + the theme's HighlightStyle). The selection menu is driven by the view's touch selection hooks, reusing the existing menu UI. * perf(editor): leave out CodeMirror's fold gutter with the canvas renderer The canvas renderer draws its own fold markers, but foldGutter() was still in the state, and its markers plugin rebuilt (unused) markers for the viewport on every update and tab switch. Canvas views now get only the folding state (codeFolding) with indentation folding. * fix(editor): open the color picker on canvas views isViewEditable read contentDOM's contenteditable and aria-readonly attributes. A canvas view's contentDOM is its hidden input element, which has neither, so taps on color chips (regex and LSP document colors) were swallowed as if the editor were read-only. Read the state's editable and readOnly facets instead, which is what the DOM editor's attributes reflect. * feat(editor): leave read-only handling to canvas views Acode's read-only setup works around the DOM editor on mobile: it makes the content non-editable, blurs on every focus so no keyboard opens, and shows CodeMirror's cursor layer with CSS. A canvas view handles read-only documents itself: it ignores typing, cut, paste and drops, takes focus with inputmode="none" (so its cursor blinks and hardware shortcuts work, without a keyboard), and drops focus when it becomes read-only. For canvas views the extension is now only EditorState.readOnly plus the filter for Acode's own editing commands, and blurEditorIfReadOnly / focusEditorIfEditable leave them focused. * feat(editor): selection matches and active indent guide on canvas With the canvas renderer: - highlightSelectionMatches is on (it's off by default for the DOM editor), drawn with the theme's selectionMatch color, or its selection color, as the themes' CSS does; - indent guides highlight the block around the cursor (one rect per frame on the canvas); - the base extensions leave out drawSelection, dropCursor, highlightActiveLine (and its gutter) and highlightSpecialChars, which the canvas draws itself. The canvas view only skipped their plugins; the active line gutter still rebuilt its markers on every selection change. * feat(editor): show lint underlines on canvas views on touch devices On touch devices the LSP linter drops every in-text mark (markerFilter), so only the lint gutter showed an error. Canvas views draw the wavy underlines and lint points natively, without the DOM editor's layout cost, so they keep them; hover tooltips stay filtered on touch. * perf(editor): draw color chips on canvas views without DOM ColorChipWidget gets toCanvas(): the same box toDOM styles (0.9em, 2px margins, rounded, a faint border), in cells of the view's font. Canvas views then make no element per chip; they call toDOM only when a chip is tapped, so the color picker still opens. * fix(editor): apply the line height setting to the editor's lines The font theme set `lineHeight` on the editor element, but CodeMirror's base theme sets `line-height: 1.4` on `.cm-scroller`, so the setting never reached the lines or gutters: the DOM editor was always 1.4 while canvas views used the setting, and the two renderers didn't match. Set it on `.cm-scroller`, so both renderers use it (canvas-view measures it like CodeMirror, to the DOM's exact value). The default becomes 1.4, what the editor always showed, and stored values of the old default (2), which nobody ever saw, are migrated once so editors don't change size. * feat(editor): canvas backend and sticky scroll settings Two settings for the canvas renderer, next to "Renderer": - "Canvas backend": Auto (WebGL2), WebGL2 or WebGPU (falls back to WebGL2 where unavailable). Views are created with it, so a change asks to reload when the canvas renderer is on. - "Sticky scroll": keeps the header lines of the scopes around the top line pinned while scrolling. Applies live to canvas views. * build: use @acode.app/canvas-view from npm canvas-view is now published as @acode.app/canvas-view, so depend on it instead of a local `bun link` checkout and drop the rspack and tsconfig workarounds that kept the linked copy on Acode's CodeMirror packages. Raise @codemirror/view, state, language and @lezer/common to the versions canvas-view requires, in dependencies and overrides, so a single copy of each is installed. The newer view flushes on every selectionchange, and happy-dom fires that event synchronously from Selection methods, which re-entered EditorView.update in the read-only cursor test. Queue it there like a browser does. * fix(editor): keep edits and DOM extensions across renderer changes - Flush pending cache writes and save the session before the reload that applies a renderer or canvas backend change, as the pause handler does, so recent edits aren't lost. - Include the renderer in the editor state signature, and give the DOM fallback pane a fresh empty state, so states built for canvas views (without fold controls and the active line) aren't reused by DOM ones. - Declare the canvas backend and sticky scroll strings in LangStrings. * feat(settings): more canvas renderer settings, shown only with canvas - Cursor blink rate, sticky scroll max lines and gutter marker layout (shared column, column per gutter, over line numbers), mapped to the matching canvas-view options and applied live. - Bring back the scroll speed setting, which canvas views use. - Canvas-only settings (backend, sticky scroll, its max lines, gutter markers, cursor blink rate, scroll speed) are listed only while the canvas renderer is selected, and follow renderer changes. --------- (cherry picked from commit 98446ef10ea8f2866416d18e753ccc8bfccd8b44) * chore(deps): bump @acode.app/canvas-view to 0.0.2 The canvas renderer now draws font ligatures (Fira Code's =>, !==...) like the DOM editor, and its fold markers no longer flash when the mouse quickly enters and leaves the gutter. (cherry picked from commit a16e2d3b2c95f5f670121075584617c2c838df54) * Translation: Update hu-hu.json (#2989) * Translation: Update hu-hu.json Translate new strings * Translation: Update hu-hu.json Fix translation (cherry picked from commit 2f6e4c55e82333545ba987054aafc62929225e21) * chore(deps): bump @acode.app/canvas-view to 0.0.3 The canvas renderer's repeated flicks now add up like Android's list views, a magnifier shows the text under the finger while dragging a selection (like sora-editor), and touch selections no longer draw a blinking cursor at their end. (cherry picked from commit f4b75304f5af12c7891d137517350fce6967d536) * test: queue happy-dom selectionchange in quick tools navigation tests @codemirror/view 6.43.14+ re-enters EditorView.update when happy-dom fires selectionchange synchronously while the view syncs its selection. * feat(sidebar): add multi-select & drag-drop to file tree (#2999) * feat(sidebar): add multi-select to file tree Select files and folders in the sidebar and act on them together: copy, cut, delete, copy relative paths, open and rename. The clipboard is now shared across open folders and pastes multiple entries. * feat(sidebar): drag to move, folder header actions, review fixes - Long-press and drag entries (or the whole selection) onto a folder to move them; closed folders open on hover and the list scrolls at edges. - Open folder headers get New file, New folder, Refresh and Collapse all: shown on hover with a mouse, behind a single "+" on touch. - Paste keeps skipped or failed entries in the clipboard and continues past failures. - Pasting across servers or storage transfers through both providers. - Open and copy path keep entries selected inside a selected folder. - Folder-into-itself warnings no longer block the paste. - Closing an open folder drops its entries from the selection. - Mock the new sidebar modules in the file icon sidebar test. * feat(sidebar): slide folder header actions out inline on touch Tapping "+" now reveals the actions as an inline strip in the header instead of a popup menu; it closes after an action or a tap elsewhere. * fix(sidebar): header menu, tree scrolling, long-press and review fixes - Header button opens the folder's select menu, which now also has Refresh and Collapse all. - Size open folders on every expand and measure real header heights, so the tree can scroll to its last entry. - Holding still after a long press opens the menu without lifting; a drag needs a deliberate move. - Release touch listeners after a drag ends. - Replacing an existing entry works when pasting across connections. * fix(sidebar): keep drags working across open folders Opening another folder mid-drag collapsed the source folder, which then collapsed the new one back, and detached the touched row so the drag stopped receiving touch events. Size folders only when they expand, listen for touch events on the touched row too, and cancel a drag on any stray touch. * fix(sidebar): check exclusions before replacing, recheck folder before sizing - Cross-connection copies skip excluded entries before deleting an existing destination. - Size a folder only if it's still open once the files app has loaded. (cherry picked from commit dd6497033c62ee0c21b29945cf59c5976169a72e) * fix(sidebar): don't render a folder twice when toggled while loading (#3002) * fix(sidebar): don't render a folder twice when toggled while loading Collapsing and re-expanding a folder before its listing finished let the old load render alongside the new one. Stale loads now skip rendering, and a new expand or collapse cancels a tree that is still loading. * test(sidebar): cover root folders toggled while loading Drive a real root folder through expand, collapse and expand with the directory reads still pending, resolving them in both orders and failing the stale one, and check that only the latest tree renders, a stale error doesn't collapse the folder and the loading bar follows the latest read. openFolder's single JSX expression becomes a tag() call so the module can load in tests. * test(sidebar): stub global tag in root folder tests (cherry picked from commit 9960e6e227c79c6ed03b2de4231aca2506aeec30) * fix(scrollbar): place thumb correctly when it reappears (#3003) * fix(scrollbar): place thumb correctly when it reappears The value was set while the scrollbar was detached, so it was measured against an empty rect and painted at 0 for a frame. Only check the track along the scroll axis, and measure again after appending. * fix(scrollbar): measure the track on every update while attached The parent can change size without a window resize (e.g. the sidebar opening), so a cached track length can go stale. (cherry picked from commit 06db49298f8e4e1cf3c80f436f1b50c7dca17276) * feat(ui): polish dialogs, sidebar, search and file actions (#3004) * feat(ui): polish dialogs, sidebar, search and file actions - Rename selects the file name without its extension - Hide the search summary until there is a query - Show an unread dot on the notifications icon; clear-all icon - Pin the sponsor icon above the profile, out of the app list - Make the sidebar icon rail scrollable on touch - Show Delete in red in menus; distinct Save as icon - Map common native errors to readable messages - Theme-aware toast; sentence-case dialog buttons and titles - Title-case settings page names; fix inconsistent labels * style: format files command * fix(prompt): select whole file name when it has no extension (cherry picked from commit 6962af1e805b8996e743df97cad4df3ecef687e5) * fix: ios review issues (#22) * fix: ios review issues * fix: login issue, harden window.fetch * fix: app login * fix: app login * fix: app login * fix(ios): preserve API response cookies across redirects - Store trusted API response cookies while preserving environment-specific account tokens. - Refresh outgoing cookies on redirects and read Set-Cookie directly. - Add cookie lifecycle and redirect regression coverage. - Document review findings and resolutions. * fix: linting and formatting --------- Co-authored-by: Ajit Kumar <dellevenjack@gmail> * chore(deps): bump katex (#25) Bumps the npm_and_yarn group with 1 update in the / directory: [katex](https://github.com/KaTeX/KaTeX). Updates `katex` from 0.16.47 to 0.19.0 - [Release notes](https://github.com/KaTeX/KaTeX/releases) - [Changelog](https://github.com/KaTeX/KaTeX/blob/main/CHANGELOG.md) - [Commits](https://github.com/KaTeX/KaTeX/compare/v0.16.47...v0.19.0) --- updated-dependencies: - dependency-name: katex dependency-version: 0.19.0 dependency-type: direct:production dependency-group: npm_and_yarn ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix(ios): keep FAQs in-app and preserve website context (#30) * fix(ios): keep FAQs in-app and preserve website context - Add searchable FAQs with sanitized answers, offline caching, timeout handling, and retry feedback. - Preserve iOS context on trusted Acode website links without rewriting encoded query parameters. - Guard asynchronous Help navigation and make search cleanup reliable and accessible. - Add focused regression coverage and update build metadata to 1021. Validation: 18 FAQ, Help, and search-bar tests; Biome checks; production iOS web bundle build (two asset-size warnings). * fix(ci): complete FAQ translations and stabilize iOS tests Add the missing FAQ error, empty-state, and retry keys to 32 locales using English fallbacks so translation validation passes. Align existing iOS tests with the current file-browser menus, page lifecycle, terminal storage, and standalone worker console. Improve fixture cleanup, wait for keyboard layout, verify persisted icon selection, and isolate gesture and theme tests from ads and startup updates. Validation: 160 iPhone tests and 30 iPad checks passed on iOS 18.6 simulators. Translation validation, formatting, and diff checks passed. * Stabilize iOS simulator CI and preview keyboard layout Use macOS 15 with Xcode 26.3 and require iOS 18.6 simulators for StoreKit and alternate-icon testing. Restore the preview safe-area bottom after the keyboard is dismissed on iOS 26, and allow 10 seconds for local SSH/FTP fixture configuration. Validated: 1,072 JavaScript tests, 50 Android tests across three variants, 160 iPhone tests, 30 iPad checks, and 3 iOS 26.2 preview regressions. TypeScript, formatting, translations, and workflow selection checks pass. Simulator runs used local Xcode 27.1; remote CI remains to be verified. * test(ios): stabilize simulator fixtures and navigation waits Share consent suppression with debug simulator UI launches so live forms cannot cover test controls. Initialize StoreKit sessions before reloading the app, and wait for a new WebView document instead of fixed reload delays. Wait for preview navigation and title updates, verify fullscreen through native state, retain simulated document pickers, and clean up keyboard fixtures even when setup fails. Preserve the existing feature assertions. Validation: 160 iPhone tests and 30 iPad checks passed on iOS 18.6 with Xcode 27.1, with no skipped tests. Formatter and whitespace checks passed. The separate CI-only Alpine process exits remain unreproduced locally. * fix(ios): polish FAQs, changelog rendering and startup guidance - Request platform-specific FAQs, refresh from the network, and reserve the platform-scoped cache for offline fallback while preserving page navigation. - Preserve code and URL destinations when linking changelog references, validate author mentions, and use theme-aware link colors. - Use iOS-specific startup and terminal guidance, open development projects explicitly in Xcode, and avoid redundant preview keyboard constraints. - Add focused regressions and bump versionCode to 1022. Validation: - 39 focused JavaScript tests passed; full suite: 1077 passed, 3 failed, 1 skipped. The same three failures reproduce on origin/main with the installed dependencies. - 13 simulator checks passed on iPhone iOS 26.5 and iPadOS 18.6 each, followed by 5 successful checks after the link-color adjustment. - Production iOS web bundle built; Chrome rendering and visual checks passed. - The known iPad appearance-transition warning occurred in the combined run but did not recur in the isolated console recheck. * bump: version * ci(ios): temporarily skip Alpine tests on hosted runners Exclude the 12 Alpine-dependent tests only in GitHub CI while retaining full local coverage and the remaining 150 simulator tests. Forward explicit Xcode skip filters through the iOS test command. Wait for the context menu and its New file action before interacting in the UI test. Validate filter forwarding with focused unit coverage. --------- Co-authored-by: Ajit Kumar <dellevenjack@gmail> * feat(lang): update Turkish (tr-tr) translation (#2992) * feat(lang): update Turkish (tr-tr) translation * fix(lang): use "Yüklü" for "Installed" in tr-tr (cherry picked from commit 1d163d301eaa0ca96ce9e2218d1c11d22e1b627c) * fix(editor): keep cursor in document when pasting CRLF text (#3018) * fix(editor): keep cursor in document when pasting CRLF text Also update @lezer/common to 1.5.5. * chore(deps): sync package-lock with @lezer/common 1.5.5 * test(editor): cover pasting CRLF text (cherry picked from commit 672750c4e53a554b8f45cfe3092b29ce8406d3c9) * perf: keep the native Array.prototype.push on old WebViews (#3019) core-js forces its own Array.prototype.push below Chrome 122, because V8 there doesn't throw on push() with no arguments to an array whose length is read-only (V8 issue 12681). Nothing relies on that, but the replacement is plain JS and every push in the app goes through it. On an Infinix X688C (2GB, Helio G35-class CPU, WebView 80), 1M pushes took 1032ms with the polyfill and 122ms without, and a full parse of a 4MB JS file in Acode went from ~25s to ~18s. Text and first colors on opening that file came ~200ms and 200-400ms sooner, with both editors. WebView 122+ already used the native push and is unaffected. Ported from commit 521d67c0c0ee573445b5ed5868c1b62aedceeb62. Upstream bundles all of core-js/stable and swaps the module for an empty one with a NormalModuleReplacementPlugin. Here swc's env (mode "entry") already picks the core-js modules for the target engines, so the module is left out with env.exclude instead. * chore(deps): bump @acode.app/canvas-view to 0.0.4 * feat(editor): canvas word completion from canvas-view's word index Canvas editors now complete words with canvas-view's completeWords, from an index that recounts only the changed lines, ranks words near the cursor first and returns at most 200 matches. The DOM editor keeps CodeMirror's completeAnyWord. completeAnyWord caches word lists per Text node only below 2000 distinct words, so in a big file it re-merges the upper nodes' lists on every query and returns every distinct word for autocomplete to filter. In a 4MB JS file on an Infinix X688C (2GB, WebView 80): 34.5-35.2ms per query (20,573 options) against 2.1ms (at most 200). wordIndex() is in the local word completion extension for every editor; it does nothing until a canvas editor asks for completions. * fix(ads): harden startup and retire ad-free passes (#34) Bound iOS ATT and StoreKit startup waits, reject stale callbacks, and cache verified ad environments with a monotonic retry cooldown. Guard rewarded presentation recovery on both platforms and keep retries bounded. Remove new ad-free pass offers, redemption APIs, unused academy ad units, and related UI/translations while honoring previously earned time. Reuse one share service across bridge calls and fix native callback lifetime warnings and Alpine SDK cache invalidation. Prepare build 1023 and keep local review notes ignored. Validation before commit: 34 selected iOS native/bridge tests passed, including a final 14-test ATT/StoreKit rerun; unsigned device Release build succeeded. Earlier unchanged JS and Android suites passed. Formatting and staged whitespace checks pass. Physical TestFlight verification remains. BREAKING CHANGE: system.redeemReward and the retired ad-free-pass offer APIs/exports are removed; existing earned ad-free time remains valid. Co-authored-by: Ajit Kumar <dellevenjack@gmail> * Update zh-cn.json and zh-hant.json (#3022) (cherry picked from commit dba9741f04a8e014093fbb50607fe0ff7cb8d90b) * chore(lang): translate remaining Azerbaijani UI strings (#3012) (cherry picked from commit 568286d5186ebf37334a86d24a93eb36c1f6daac) * fix(styles): guard color-mix() with @supports for old WebViews (#3025) (cherry picked from commit 84995d75692aedda68750cdf82998d845c1fe1e3) * chore(deps): bump @acode.app/canvas-view to 0.0.5 (cherry picked from commit 59fadfc72c6023e7707f7e32660b02b804ac24cc) * fix(search): expand regex capture groups in native replace (#3033) * fix(search): expand regex capture groups in native replace Replacements on file:// and SAF files escaped the replacement string, so $1, $& and $<name> were inserted literally. In regex mode, apply JS String.replace substitution rules so both search paths behave the same. Fixes #3026 * fix(search): ignore character classes when detecting named groups (cherry picked from commit 4e21bbe2e754e8f5991a15730776dfc37d69a5d1) * perf(tabs): speed up closing and saving many tabs (#3035) * perf(tabs): speed up closing and saving many tabs - Close background tabs before active ones so no tab is activated only to be closed, and sync the tab list and session state once per batch. - Save all: save files with a location four at a time with a progress dialog, then retry the rest one by one with the usual prompts; files that fail stay open instead of aborting the whole operation. - Check the file mtime before reading it back for conflict detection. - Keep a save timer per file so concurrent saves all finish, and coalesce the session update. - Only run format-on-save when the saved file is the active one. Fixes #3030, fixes #3031, fixes #3032 * test(save): cover batched save-all and keep reporting save errors * fix(save): keep remote saves sequential and restore content conflict check - Only save local (file:) and SAF (content:) files in parallel; remote providers such as SFTP share a connection and now save one by one. - Restore the content comparison before overwriting so an external edit that keeps the mtime still triggers the conflict prompt. - Show how many files were saved, or could not be saved, once save all finishes. (cherry picked from commit 27454184a150d716bbe3e3057b344ca2d7cfd776) * Translation: Update hu-hu.json (#3046) Translte new strings fix translation (cherry picked from commit 40209f438c236b6d46f8810069335f44948dcb9e) * fix: allow replace all with an empty replacement (#3048) * fix: allow replace all with an empty replacement Search in files returned early from replaceAll() when the replace field was empty, so there was no way to delete every match. Both the worker and the native replace already handle an empty string, so only the search query is required now. Fixes #3044 * fix: keep empty replacement text for files that are not open openFile ignored supplied text when it was an empty string, so a closed file whose whole content was replaced with "" was reloaded from disk. (cherry picked from commit f3b31dcbb0d9b39c5bb6b276380f29c7a5738941) * feat: add hints to search in files search options (#3042) * feat: add hints to search in files search options * test: use a real checkbox input in search option tooltip test --------- Co-authored-by: mittal <mittal.singh@digitem.tech> Co-authored-by: Raunak Raj <71929976+bajrangCoder@users.noreply.github.com> (cherry picked from commit 2827118eadadb1968096674001f2b7d97f89953a) * chore(deps): bump ghcr.io/devcontainers/features/node (#3052) Bumps ghcr.io/devcontainers/features/node from 2.1.1 to 2.1.2. --- updated-dependencies: - dependency-name: ghcr.io/devcontainers/features/node dependency-version: 2.1.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> (cherry picked from commit 5dc755e272b6a0dcd66cb30cd94adc4d125cb8af) * chore(deps): bump sigstore/cosign-installer from 4.1.2 to 4.1.3 (#3053) Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 4.1.2 to 4.1.3. - [Release notes](https://github.com/sigstore/cosign-installer/releases) - [Commits](https://github.com/sigstore/cosign-installer/compare/v4.1.2...v4.1.3) --- updated-dependencies: - dependency-name: sigstore/cosign-installer dependency-version: 4.1.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> (cherry picked from commit 34c1269f4f2186fa15565fa1f83c86dd6fce052e) * chore(deps): bump @acode.app/canvas-view to 0.0.7 (cherry picked from commit 509a26ae4960517ab68b712cc75c23a8bec026b7) * feat(editor): see-through canvas behind a plugin's background picture When a plugin puts a picture behind the editor (Backdrop draws one on .cm-editor::before; the DOM editor's text has no background of its own), canvas views get a transparent background, so the picture shows through the text, gutter and sticky lines, with a translucent active line (the theme's, or the text color at 8%, like Backdrop's) and no active gutter background. Style sheets added, removed or rewritten are watched (at most once per frame), so turning the picture on or off applies live; new views are checked when created. Needs @acode.app/canvas-view 0.0.7. (cherry picked from commit 2ce83c48252c8fde49e56354fa237d654f0b19ef) * feat(editor): canvasMagnifier setting for the canvas selection magnifier (cherry picked from commit 19c81b0b1217165305719aea2aad929463cb2b71) * fix(editor): clear native selection handles when the editor loses focus (#3066) With the DOM renderer, Android kept drawing its native selection handles when focus moved from the editor to the ⋮ menu or a page such as Settings, because the DOM selection stayed inside the editor. The handles floated above the menu and page and could still be dragged. Clear a DOM selection inside the editor when focus leaves it for another element of the app. drawSelection() keeps showing CodeMirror's selection, and CodeMirror writes the DOM selection again when the editor is focused. Fixes #3059 (cherry picked from commit 92f7281db0bd78b3adee43535b259fac5930d536) * fix(editor): hide canvas fold markers when code folding is off (#3067) (cherry picked from commit baf667945ed8ab2bf27b2566c74143d13d3bcebf) * fix(scrollbar): don't reopen the keyboard when dragging the scrollbar (#3069) The scrollbar cancelled its touchend. Android WebView shows the keyboard after a cancelled touchend while an editable element has focus, so dragging the scrollbar with the editor focused and the keyboard hidden opened the keyboard again, and the editor then scrolled back to the cursor. Only the mouse path cancels now. The cancelled touchstart already stops the click and page scrolling. Fixes #3058 (cherry picked from commit 698297f5072aee681442a8720672a6b3984edd56) * feat(editor): let themes set the canvas gutter border (#3070) (cherry picked from commit 50179ace7e0c1de6c4677efebd85764ae4118bf5) * fix(editor): canvas theme colors for plugin themes styled in CSS (#3072) * fix(editor): canvas theme colors for plugin themes styled in CSS Plugin themes registered with only background, foreground and syntax colors in their config style the active line, gutter, cursor and selection in their EditorView.theme. The canvas renderer, which doesn't draw from CSS, showed defaults there. getCanvasTheme now reads those colors from the theme's own style rules (once per theme, no DOM), including an outlined active line (inset box-shadow); the config still wins where it sets a color. A plugin theme registered after the editor was created kept the canvas on One Dark's colors: re-applying the same theme id was skipped. The sync key now includes the registered theme entry. * chore(deps): bump @acode.app/canvas-view to 0.0.8 (cherry picked from commit 9da2b96bf006677cae80c5a29d95baf28a6e4da1) * chore(deps): bump @acode.app/canvas-view to 0.0.9 (cherry picked from commit 69ede66683eabb81afae304aa9d3c4b21f8cafa5) * test(canvas): run canvasOptions tests under happy-dom canvas-view 0.0.9 reads Element.prototype at import, which crashes in the Node test environment. (cherry picked from commit 18b6d023f27789f8a1cc88af2a359228f5dba74c) * refactor(editor): take canvas theme colors from the theme's CSS (#3088) * refactor(editor): take canvas theme colors from the theme's CSS canvas-view now resolves a theme's colors from the state's style modules itself. getCanvasTheme returns a function over that resolved theme and only adds what the CSS doesn't say: Acode's own scrollbars, a see-through canvas over a picture, the gutter border, and syntax colors for themes without a highlight style. The theme's CSS is the only source for the rest, so the canvas draws a theme like the DOM editor does. * chore(deps): bump @acode.app/canvas-view to 0.0.10 * test(canvas): check which syntax colors the canvas draws A theme whose highlight style and config disagree: tokens take the highlight style's colors, and the config's are only used without one. (cherry picked from commit 86f52c13be452da7b876e5b677feedff44db0d2d) * docs(contributing): add rules for performance changes (cherry picked from commit 51183f27981cf6c34f7f1ab070d918cd88d23ce2) * chore(deps): bump @acode.app/canvas-view to 0.0.11 (cherry picked from commit c18c6c0e522a60a2b165aed722275e165a2867e0) * update: translate strings in es-sv (#3015) * update: es-sv Translate new strings and fix some consistency issues introduced in prior updates * chore: exclude pnpm-workspace * fix: columba → columna (typo) --------- Co-authored-by: ajr-uribe <anthonyuribe3456@gmail.com> (cherry picked from commit 747a48ee2336765aa8a1acefc8819ef1ed180eff) * chore(deps): bump @lezer/common to 1.5.6 1.5.6 finds parseMixed's nested regions over several advance() calls instead of one, so parse time budgets hold for mixed languages (HTML, Vue, Markdown, the JSDoc-wrapped JS mode): in a 2000-line HTML file with ~3300 style attributes, the longest single parse step went from 10.9ms to 2.4ms. It also fixes TreeFragment.applyChanges marking open fragments closed, which made some incremental reparses produce a different tree than a fresh parse of the same text. (cherry picked from commit 7a667de944279402a5809c02437fff575f0a4fde) * fix(ios): expand regex capture groups in native replace Port of Acode #3033 to the iOS workspace index: replacements in regex mode now follow JS String.replace substitution rules ($$, $&, $`, $', $1..$99, $<name>) instead of inserting the replacement literally. * feat: added api for launchAppwithFile (#3061) * feat: added api for launchAppwithFile * fix: conflicts * fix: conflicts * fix: comments * fix: package json Migration: the JS API and types move to src/native/system.ts and src/native/types/system.d.ts, with option validation in src/native/launchAppWithFileArgs.ts. (cherry picked from commit f5d30764de4a903861fc7840e3197bf87ed669ee) * chore(ci): Enhance close inactive issues workflow (#3117) Updated stale issue management messages and labels. (cherry picked from commit c80af909a4e5a96d348e6b2b3fb0a79521e6387e) * chore(ci): Add 'attention needed' label to exempt issues (#3118) * chore(ci): Enhance close inactive issues workflow Updated stale issue management messages and labels. * Add 'attention needed' label to exempt issues (cherry picked from commit 31c608095b273ce1346b69bb6e713947e4860578) * docs: update readme for Android and iOS release Acode is now on the App Store, so the readme covers both platforms: App Store badge, Android and iOS build steps with npm (as in CONTRIBUTING and CI), an updated project structure, and repo-relative links for when this becomes the main repository. CONTRIBUTING no longer calls iOS a port in progress, and the iOS port notes describe regex-aware native replace. * Merge pull request #36 from bajrangCoder/feat/port-improved-webview feat: improved webview (#2924) * fix(android): compile the ported launchAppWithFile and WebView code The launchAppWithFile port (#3061) kept Cordova's CallbackContext type, and the improved WebView port (#2924) renamed PluginResult to the runtime Payload inside WebViewInstance, which already has a private Payload JSON helper, so Payload.Status no longer resolved. Use Callback, and the fully qualified runtime Payload for boolean results. * chore: add bun.lock for the native runtime dependencies Acode main tracks bun.lock, so keep one, regenerated for this package.json. It resolves the same versions as package-lock.json. * fix(ios): reject terminal server requests from untrusted origins Browsers send cross-origin simple POSTs and WebSocket upgrades without a preflight, so a page in the preview or in-app browser could POST to 127.0.0.1:8767/execute-command and run a shell command even though it cannot read the reply. Reject any request whose Origin is present and not the app's own; native callers and guest programs send none. * fix(file): decode chunked readAsText as one stream readAsText on native files decoded each 256 KiB range natively and joined the strings, so a multi-byte character crossing a range boundary failed the read on iOS and became replacement characters on Android. Read the ranges as bytes and decode them with a streaming TextDecoder, keeping the native per-chunk decoding for encodings TextDecoder does not know. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Ajit Kumar <dellevenjack@gmail> Co-authored-by: Rohit Kushvaha <oldisg131@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Ajit Kumar <dellevenjack@gmail.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: curly72alpha <curly72alpha@gmail.com> Co-authored-by: curly72alpha <105135880+curly72alpha@users.noreply.github.com> Co-authored-by: Emmanuel Lobo <76094069+UnschooledGamer@users.noreply.github.com> Co-authored-by: Aadin <hey.itsaadin@gmail.com> Co-authored-by: AuDevTist1C <114492072+AuDevTist1C@users.noreply.github.com> Co-authored-by: JOBIANS TECHIE <88005779+Jobians@users.noreply.github.com> Co-authored-by: Priyanshu Jain <jain.yashu2211@gmail.com> Co-authored-by: ajr_uribe <anthonyuribe3456@gmail.com> Co-authored-by: summoner <summoner001@users.noreply.github.com> Co-authored-by: KARANKOYU <262628218+KARANKOYU@users.noreply.github.com> Co-authored-by: Launch Lee <80872691+LaunchLee@users.noreply.github.com> Co-authored-by: Jamal Ali <jamalkamaladdin@gmail.com> Co-authored-by: bardrop <mradulsingh524.ms@gmail.com> Co-authored-by: Mittal Singh <111978266+Mittalnew@users.noreply.github.com> Co-authored-by: mittal <mittal.singh@digitem.tech>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3044
Problem
In search in files, "replace all" did nothing when the replace field was empty, so there was no way to delete every match.
replaceAll()returned early withif (!search || !replace) return;, and an empty string is falsy.Fix
Only the search query is required now. The two replace paths already handle an empty replacement:
content.replace(search, "")WorkspaceIndex.runSearch):replace == null ? "" : replace, thenreplaceAllTests
New
tests/unit/searchReplaceAll.test.js(samevm+ source slice style assearchStreamingResults.test.js):replace-files,"")replace,"")The first two fail on
mainand pass with this change.npx vitest run: 862 tests, the only failures are the 4 LSP test files that import@codemirror/lsp-clientfrom thecodemirror-lsp-clientsubmodule, which I did not check out (same onmain).biome checkis clean on the changed files.I did not test this on a device.