Commit Graph
100 Commits
Author SHA1 Message Date
Martín Lucas Golini 4e3c2d966f ecode: allow deleting untracked files from Git status
- Add a Delete action for untracked files and the Untracked section, with
  confirmation before permanently removing the selected paths.

  - Decode Git-quoted status paths using new byte-oriented std::string
  String::escape() and String::unescape() overloads, preventing quoted or
  octal-escaped filenames from breaking deletion.

  - Add translations and regression tests for string escaping and quoted
  untracked paths.
2026-09-15 13:19:24 -03:00
Martín Lucas Golini 50a0594038 Repect click step in UITerminal mouse wheel scroll. 2026-09-14 20:05:30 -03:00
Martín Lucas Golini be685c3fda Fixed the CI-dependent assertion.
The test now compares the plugin position against EventDispatcher::getMousePos(), which is the actual scene-space value passed by UICodeEditor. Native pixel coordinates can differ by one after DPI/view mapping.
2026-09-14 18:45:18 -03:00
Martín Lucas Golini 71360cb896 Simplify mouse-over ancestry tracking
- Derive isMouseOverMeOrChildren() from the event dispatcher's committed
  mouse-over node instead of maintaining a transient flag on every node.

  - Remove the mouse-over tracking set, per-frame flag clearing, and hover
  bookkeeping side effects from hit testing. This makes hover ancestry
  available between scene updates while reducing SceneNode size and
  eliminating hash-set operations during overFind().

  - Add coverage for persistent ancestry, sibling transitions, hover state
  synchronization, and side-effect-free hit testing.
2026-09-14 18:29:51 -03:00
Martín Lucas Golini 51afa1870a Fix mouse wheel bubbling and plugin event handling
- Queue native wheel events until hover state has been rebuilt, restoring
  scroll propagation from children that cannot scroll to their scrollable
  ancestors.

  - Add MouseWheelEvent and UICodeEditorPlugin::onMouseWheel() so plugins can
  consume precise wheel input before the editor handles it. Migrate
  autocomplete and AI Assistant wheel handlers to the new API while
  preserving the existing virtual event dispatch semantics.

  - Add regressions for wheel bubbling, plugin interception, generic wheel
  listeners, and override-based callback suppression.
2026-09-14 17:58:06 -03:00
Martín Lucas Golini 6bccec171e ecode: improve read-only file handling
- add -r/--read-only to lock files opened from the command line
  - preserve read-only mode when forwarding files over IPC
  - apply locking only to the input files
  - fix the Read Only checkbox by routing it through lock-toggle
  - correctly process each path when opening multiple input files

Implements SpartanJ/ecode#954
2026-09-14 13:46:53 -03:00
Martín Lucas Golini d41025b91b Fix multi-window input routing regressions
Add a backend-neutral Input::pushEvent() API with SDL2 and SDL3
implementations, allowing native input translation and routing to be
covered without requiring physical input or backend-specific test code.

Add regression coverage ensuring a native mouse-wheel event is emitted
exactly once and delivered only to its target application window.

Resolve event coordinates and resize dimensions using the target
window's scale instead of the window polling SDL's global event queue.
This preserves correct input and sizing across windows on displays with
different DPI scales.

Also restore SDL3 compatibility with versions older than 3.2.12 when
deriving integer wheel directions from floating-point offsets.
2026-09-14 00:12:46 -03:00
Martín Lucas Golini 56e13bbbe8 And also fix it for SDL3. 2026-09-13 22:33:43 -03:00
Martín Lucas Golini ca3432fb5a Fix accidental duplicated mouse wheel events! 2026-09-13 22:29:41 -03:00
Martín Lucas Golini 071bc5d697 Add optional smooth scrolling across UI scrollable widgets
Introduce UIScrollController to provide frame-rate-independent wheel
interpolation, touch dragging, and momentum for code editors, terminals,
scroll views, and scrollable widgets while preserving the legacy instant
scrolling path.

Add a UISceneNode-level smooth-scrolling policy. Embedded scenes inherit
the root scene setting, new widgets snapshot it during construction, and
setSmoothScrollEnabled() can optionally apply changes to existing widgets
across the complete embedded-scene hierarchy.

Move native macOS scrolling and title-bar helpers into PlatformHelper,
enable native momentum from UIApplication, and explicitly enable it in
ecode. Preserve precise SDL2 and SDL3 wheel deltas for fractional momentum
events without changing normal integer wheel steps.

Replace the separate editor and terminal preferences in ecode and eterm
with one global smooth-scrolling setting, including legacy configuration
migration, live updates, and localized settings text.

Improve UITouchDraggableWidget momentum handling and add regression tests
for scrolling interpolation, pixel-aligned editor positions, scene
inheritance, widget overrides, and immediate policy application.
2026-09-13 20:27:37 -03:00
Martín Lucas Golini 42de99cf3b Fix GL resource sharing across native application windows
Decouple GL object sharing between native windows from auxiliary worker-thread context support. Platforms without threaded GL contexts, such as Haiku, must still share textures and other GL resources between their window contexts.

Always configure SDL_GL_SHARE_WITH_CURRENT_CONTEXT according to the requested context settings, while continuing to create the auxiliary thread context only on supported platforms. Explicitly reset the SDL attribute for non-shared contexts to avoid leaking state into subsequent window creation.

Apply the fix to both SDL2 and SDL3 backends. Also link the Haiku unit test executable against libbsd and libnetwork to resolve its PTY and socket dependencies.
2026-09-12 01:51:17 -03:00
Martín Lucas Golini 5d3be27a9d fix: release compression state and skip offscreen maximize
Finalize zlib streams on every success and failure path after initialization,
preventing terminal frame compression from leaking encoder allocations.

Skip SDL window maximization in headless and terminal runtimes, where it is
meaningless and can leave worker-thread SDL error/TLS allocations alive.

Also correct the dormant Brotli streaming encoder loop so it validates
parameters, handles empty input and read failures, drains pending output,
finishes the stream completely, and destroys its state on every exit path.
2026-09-12 01:11:35 -03:00
Martín Lucas Golini e88d068acc window: use native SDL drivers for terminal runtime
Use Cocoa, Windows, and Haiku native drivers for terminal-mode OpenGL context
hosts instead of the unsupported offscreen driver. Keep hosts hidden and work
around Haiku SDL2 showing hidden windows during creation.
2026-09-12 00:51:33 -03:00
Martín Lucas Golini 86277832fc Fix SystemPath.workingDirectoryRoundTripsUnicode in macOS test. 2026-09-11 00:37:03 -03:00
Martín Lucas Golini 60ac3a0ffa Fixed the Unicode-path crash and misleading AI Assistant teardown fault (SpartanJ/ecode#953).
- Windows executable paths now always use GetModuleFileNameW(), with dynamic long-path support.
  - Sys::getProcessPath() derives directly from the UTF-8 executable path.
  - Windows working-directory APIs now use wide-character functions under both MinGW and MSVC.
  - AI Assistant teardown checks that the editor splitter exists during partial initialization.
  - Added process-path and Unicode working-directory regression tests using EXPECT_STDSTREQ.
2026-09-11 00:03:03 -03:00
Martín Lucas Golini 3effffd16f Add shared controls for multi-file diff views
- Introduce UIMultiDiffView as a first-class container for multi-file diffs, with a compact toolbar for expanding or collapsing all files, switching between unified and split views, and displaying aggregate file and line-change statistics.
	- Calculate addition and removal totals during diff preparation so asynchronously prepared diffs do not need to rescan their contents on the UI thread. Cache the child diff views and expose the multi-diff state through the new component.
	- Use UIMultiDiffView for regular diff tabs and Git commit details, removing the duplicated commit-specific toolbar, styling logic, tokenizer state, and view-mode handling. Preserve the original Git commit toolbar appearance, spacing, icons, tooltips, and colored changed-files summary.
	- Keep the existing UIDiffView multi-file factory available for compatibility and add regression coverage for aggregate statistics, toolbar visibility, unified/split propagation, collapse state, prepared diffs, and large patches.
	- Add localized changed-files summaries to all ecode translation catalogs.
	- Fix the secondary-window UI test to use the appropriate std::string assertion helper.
2026-09-10 23:15:46 -03:00
Martín Lucas Golini 095fe7919e feat(ui): add native multi-window application support
- let UIApplication create, manage, render, and destroy multiple native windows
  - add scoped scene and GL window-context switching
  - route input events to the scene belonging to each native window
  - share application fonts, themes, icons, styles, and graphics resources safely
  - add NewInApplicationWindow factories for UIWindow, UIFileDialog, and UIMessageBox
  - support native parent relationships, modality, minimum sizes, and optional positioning
  - close child windows when the primary application window closes
  - defer native context destruction until the end of the application tick
  - fall back to in-scene windows for Emscripten and terminal rendering
  - reapply renderer state caches when switching OpenGL contexts
  - fix SDL2/SDL3 display bounds and multi-window lifecycle handling
  - add a native file-dialog and message-box multi-window example
  - add integration coverage for context switching, input, resources, modality, and closing
2026-09-10 19:27:29 -03:00
Martín Lucas Golini 3493e849a2 Remove tabulate because it's getting annoying. 2026-09-10 13:43:18 -03:00
Martín Lucas Golini 01bc68957e Fix Windows build. 2026-09-10 13:04:13 -03:00
Martín Lucas Golini 6ccb433dd5 perf: optimize and benchmark terminal frame damage detection
Extract frame damage detection into a private reusable implementation and add
release benchmarks for representative GUI damage patterns at 720p, 1080p,
and 4K.

Use tile-major traversal for smaller framebuffers and cache-friendly row-major
traversal above 16 MiB, with reusable scratch storage and no whole-frame
equality precheck. Determine full-frame updates from the completed damage
bounds instead of prematurely falling back based on dirty-tile area.

Present benchmark results as a table showing each strategy, the selected
production path, its gap to the fastest candidate, and resulting transfer
size.
2026-09-10 12:03:15 -03:00
Martín Lucas Golini fcc3a412fb fix: restrict persistent Kitty updates to eterm by default
Enable persistent root-image and damage updates automatically only when
TERM=eterm, since Kitty a=f root-image edits are not consistently supported
by other terminal emulators.

Use reliable anonymous full-frame transfers elsewhere while preserving the
environment variables as explicit overrides. Document the compatibility
rationale and the dependency of damage updates on persistent images.
2026-09-10 01:42:51 -03:00
Martín Lucas Golini 95d52cdbb3 eepp:
- add reusable-buffer String::toUtf8() conversion
  - extract shared find-bar CSS into UIFindBarStyle
  - reuse the shared style from UIDocFindReplace

  ecode:
  - enable terminal find, next, and previous shortcuts
  - install terminal bindings after conflicting editor bindings are removed

  eterm:
  - add searchable terminal history with plain text, RegEx, and LuaPattern modes
  - support case-sensitive and whole-word matching across wrapped rows
  - debounce searches and avoid unnecessary string allocations
  - add an animated find bar with status and wrapped result navigation
  - expose find commands through configurable keybindings and the context menu
  - render and navigate search matches in terminal history
  - forward right-button releases when applications capture the mouse
  - fix UITabWidgetSplitter ownership during shutdown

  tests:
  - cover UTF-8 buffer reuse and terminal search behavior
  - verify wrapped lines, Unicode, pattern modes, invalid expressions, and navigation
  - verify SGR right-button release encoding

  tooling:
  - clarify the mandatory optimized build workflow for performance work
  - require direct release test execution before falling back to Xvfb
2026-09-10 00:57:56 -03:00
Martín Lucas Golini a294d78733 eterm: extract settings actions and fix macOS efsw linkage
Build:
  - Link eterm with CoreFoundation and CoreServices on macOS
  - Satisfy the framework dependencies required by efsw's FSEvents backend

  Applications:
  - Move eterm settings operations into a dedicated SettingsActions class
  - Centralize settings window lifecycle and font configuration actions
  - Route settings panel font-size updates through SettingsActions
2026-09-09 17:06:38 -03:00
Martín Lucas Golini fe91253276 eterm:
- persist keybindings in keybindings.cfg with configurable primary and secondary modifiers
  - hot-reload bindings and merge newly introduced defaults
  - open keybindings.cfg in a terminal-font-sized code editor tab
  - indicate unsaved keybinding changes using the modified-tab marker
  - share tab and split commands between terminals and the keybindings editor
  - add bindings for terminal actions, tab navigation, numbered tabs, splits, renaming, and tab movement
  - expose keybindings through terminal and tab context menus
  - add tab split and move-left/right context menu actions
2026-09-09 14:32:43 -03:00
Martín Lucas Golini 410c9ba09f eterm: fix configuration and window state persistence
- load preferences and window state from their configuration files
  - persist CLI overrides after applying them
  - capture window state before closing the native window
  - restore window position and defer maximization until initialization completes
  - avoid applying pixel density twice when restoring window dimensions
  - display active keybindings in terminal and tab context menus
  - add the New Terminal context-menu action
2026-09-09 11:35:35 -03:00
Martín Lucas Golini 71ede34599 eepp: add reusable UISettingsPanel
- add the generic settings model and panel to EE::UI::Tools
  - support category navigation, filtering, and lazy materialization
  - add UISettingsPanel model and filtering tests

ecode: migrate settings to UISettingsPanel
  - replace the application-specific settings model
  - use the generic settings panel implementation
  - add monitor refresh rate as a frame limit option
  - normalize UI labels and translations

eterm: add persistent configuration and settings panel
  - persist application preferences and window state
  - use saved values as defaults for command-line options
  - persist command-line overrides
  - add graphical settings with live application
  - expose renderer, terminal behavior, appearance, font, and scale options
2026-09-09 00:56:03 -03:00
Martín Lucas Golini 64512ab44d eterm: expand tab controls and fix maximized tab lifecycle
- add ellipsized tabs and ecode-style context actions to eterm
  - support session rename, exclusive mode, tab movement, and maximize/restore
  - restore maximized tab widgets before close or split operations
  - track detached tab state directly to prevent stale references in ecode
  - keep dirty rows valid during asynchronous terminal resize
  - expose eterm's widget inspector and disable default UI effects
  - localize the new exclusive-mode action
2026-09-08 01:57:35 -03:00
Martín Lucas Golini a24eb12182 Add SDL3 non-text clipboard data support
Expose MIME-based clipboard data operations through the Clipboard interface, with unsupported defaults for SDL2.
Implement lazy data providers, cleanup callbacks, MIME type enumeration, data retrieval, availability checks, and clipboard clearing for SDL3.
2026-09-07 00:31:27 -03:00
Martín Lucas Golini 827f5d7524 ecode: fix stale and symbolic remote branch entries
Exclude symbolic remote refs such as origin/HEAD from the branch list.
Remove the corresponding local remote-tracking ref after deleting a
remote branch, and prune stale refs when pulling.
2026-09-06 21:39:11 -03:00
Martín Lucas Golini 90499462ea Fix Reset zoom in new eeiv port. 2026-09-06 21:18:06 -03:00
Martín Lucas Golini 3d4aea6df4 Reduce heap-allocations on possible hot-paths. 2026-09-06 21:02:58 -03:00
Martín Lucas Golini bd9360cf3e optimize Kitty streaming and complete terminal input
Add persistent Kitty image presentation with RGB24 framebuffer updates,
tile-based damage detection, adaptive zlib compression, chunked Base64
transmission, and unchanged-frame suppression. Fall back to complete updates
when damage exceeds the configured threshold.

Expose environment controls for damage updates, persistent presentation, and
zlib compression level. Resolve presentation policy once during initialization
to keep environment parsing outside the frame path.

Repeat a=f on animation-frame continuation chunks as required by the Kitty
protocol, and suppress graphics acknowledgements from the terminal input
stream.

Complete Kitty keyboard translation for punctuation, function, keypad,
modifier, lock, and navigation keys. Preserve associated multi-codepoint text
and disambiguate Backspace from Delete using their protocol context.

Fix IOStreamMemory::write() to report bytes written so multi-chunk compression
works correctly, avoid stdout logging in the offscreen examples, and add
regression coverage for compressed streams and chunked frame updates.
2026-09-05 17:17:09 -03:00
Martín Lucas Golini a22489fd58 Fix Android build. 2026-09-05 11:33:02 -03:00
Martín Lucas Golini 94c3b7ab99 window: add headless and Kitty terminal runtimes
Add process-level native, headless, and terminal runtime modes while keeping
the SDL2/SDL3 window backends responsible for creating the graphics context.

Use SDL's offscreen video driver with an eepp-owned logical root FBO for
headless rendering. Add caller-owned RGB24/RGBA32 framebuffer readback through
the renderer abstraction without leaking GL calls into the Window namespace.

Introduce a generic FramePresenter boundary and a Kitty presenter that streams
chunked direct RGB24 frames from a bounded worker queue. Optimize Base64
encoding for this streaming path.

Add POSIX and Windows terminal lifecycle support, Kitty keyboard input,
SGR-Pixels mouse input, focus handling, and terminal pixel-size resize events.
Inject translated events through a thread-safe Input queue so applications
continue using the normal input path.

Make UIApplication independent of physical displays in offscreen modes,
preserve native runtime behavior, and report the selected runtime and
presentation mode during initialization.

Add Sys::setEnv() for portable process environment configuration.
2026-09-05 02:54:27 -03:00
Martín Lucas Golini 6a24bc0d6e eterm: implement Kitty keyboard protocol
Add Kitty keyboard protocol negotiation, state stacks, and semantic
key encoding with support for alternate keys, event types, associated
text, and reporting all keys as escape sequences.

Forward key press, repeat, and release events through the terminal
worker while preserving legacy input behavior. Keep AltGr composition
distinct from Alt shortcuts and correlate SDL text events to prevent
missing or duplicated international-layout input.

Add protocol documentation and unit coverage for negotiation, state
transitions, modifiers, function and keypad keys, shifted input,
AltGr composition, repeats, releases, and duplicate suppression.
2026-09-04 21:13:27 -03:00
Martín Lucas Golini 2a3ba5271e Merge branch 'develop' of github.com:SpartanJ/eepp into develop 2026-09-04 19:48:17 -03:00
Martín Lucas Golini 34c33152ac Merge branch 'feature/kitty-graphics-protocol' into develop 2026-09-04 19:48:05 -03:00
Martín Lucas Golini adc562fb1d Fix regression due to kitty metadata being erased on every single pass. 2026-09-04 19:47:46 -03:00
Martín Lucas Golini 0e9f2e832f Optimize eterm Kitty graphics frame replacement
- swap decoded frames into reusable image storage
  - recycle previous frame allocations for subsequent transfers
  - avoid full-frame copies during anonymous image replacement
  - extend tests to verify safe allocation reuse across frames
  - document eterm and eeiv in the project introduction
2026-09-04 18:45:10 -03:00
Martín Lucas Golini 7ed9b7c517 Optimize Kitty graphics decoding and RGB24 rendering
- use fast Base64 decoding for non-final transfer chunks
  - rewrite strict Base64 decoding around complete quartets
  - vectorize Kitty APC control scanning with runtime AVX2 detection
  - preserve RGB24 frames through protocol storage and GPU upload
  - convert RGB24 roots to RGBA only when mutation requires it
  - handle tightly packed RGB texture uploads correctly
  - bridge transient PTY producer gaps to avoid per-chunk idle delays
  - remove the slower POSIX shared-memory transmission path
  - expand Kitty graphics and Base64 regression coverage
  - isolate the Git conflict test from user rerere configuration
2026-09-04 18:12:26 -03:00
Martín Lucas Golini 1d84bfda1b Nit. 2026-09-04 02:04:41 -03:00
Martín Lucas Golini 935b74a1a9 SDL3 fix version reported (report runtime, not comptime version). 2026-09-04 01:46:17 -03:00
Martín Lucas Golini 090e7c1288 Compilation fixes. 2026-09-03 20:29:57 -03:00
Martín Lucas Golini e45ff6af00 eterm: reuse Kitty graphics transfer buffers
Reduce allocation pressure in the Kitty graphics receive path by caching and
reusing decoded, pixel-conversion, encoded-image, and frame-composition
buffers.

Reuse uniquely owned pixel storage when replacing an existing image while
preserving immutable update data still referenced by the renderer.

Add runtime SSSE3 capability detection to CPU for future optimized paths and
extend Kitty graphics tests to cover buffer reuse and strict Base64 decoding
across boundary and large payload sizes.
2026-09-03 20:18:30 -03:00
Martín Lucas Golini 0fa1f65d04 Optimize eterm Kitty graphics rendering
- bulk-ingest Kitty APC payloads without per-byte UTF-8 processing
  - preserve APC buffer capacity between graphics commands
  - update existing GPU textures when replacing video frames
  - validate Base64 while decoding directly into transfer storage
  - reserve known image sizes and share immutable pixel buffers
  - coalesce superseded anonymous video-frame updates
  - support POSIX shared-memory transmission with stable snapshots
  - fix large unchunked images and anonymous placement replacement
  - add fragmentation, malformed input, video, and shared-memory tests
  - update Kitty graphics protocol documentation
2026-09-03 19:39:47 -03:00
Martín Lucas Golini 57754feb31 Added Kitty Graphics Protocol support for eterm module, still a WIP but working. 2026-09-03 17:19:27 -03:00
Martín Lucas Golini 53553b7861 Fix debugger pluging not initializing correctly on some cases. 2026-09-03 11:56:15 -03:00
Martín Lucas Golini 0f2f529276 Fix IME incorrectly positioning always in the terminal cursor position even if the editor was focused. 2026-09-03 00:15:23 -03:00
Martín Lucas Golini 3261b460c8 Fix Windows build. 2026-09-02 10:23:43 -03:00
Martín Lucas Golini fbfd1f3efa add cross-platform local IPC and migrate ecode
Add a generic, message-oriented EE::System::IPC abstraction using Unix-domain
  stream sockets on POSIX platforms and named pipes on Windows.

  - add versioned, binary-safe message framing
  - provide same-user endpoint isolation and hashed native endpoint names
  - handle stale POSIX sockets, duplicate listeners, timeouts, and clean shutdown
  - optimize common messages with inline storage and stack-backed endpoint buffers
  - document the public IPC API and worker-thread callback contract
  - add IPC coverage for framing errors, partial messages, binary payloads,
    sequential clients, duplicate ownership, stale sockets, and relistening
  - migrate ecode to profile-scoped IPC endpoints and JSON open-file messages
  - preserve first/latest-instance selection behavior
  - remove the filesystem watcher-based IPC transport
2026-09-02 02:28:35 -03:00
Martín Lucas Golini 51739165d0 Nit in test. 2026-09-02 00:49:03 -03:00
Martín Lucas Golini 3286cae23a Merge remote-tracking branch 'origin/feature/eterm-worker' into develop 2026-09-02 00:48:17 -03:00
Martín Lucas Golini bd335cfbf9 Merge branch 'develop' into feature/eterm-worker 2026-09-01 13:23:13 -03:00
Martín Lucas Golini 56de1e1c41 Migrate eterm to eterm-tabs, no need to keep the old eterm. The new eterm have tabs and splits by default, with no performance penalty. 2026-09-01 13:22:53 -03:00
Martín Lucas Golini eb8e56c78f Damn, forgot to stage the latest changes. 2026-09-01 11:57:10 -03:00
Martín Lucas Golini f8c324b1f1 Optimize native system font resolution. Fix duplicate macOS menu shortcuts and suppress popup hint.
Avoid enumerating every installed font during SystemFontResolver warmup.
Use native platform matching for generic families and lazily resolve
fallback fonts when a missing glyph is encountered.

Cache generic and codepoint fallback results, preserve collection face
indices, and validate native matches with FreeType. Improve CoreText,
DirectWrite, and Fontconfig matching while retaining full enumeration
for font-listing APIs.

Add a Fontconfig override for testing the backend on macOS and extend
resolver coverage for lazy matching, CJK fallback, and enumeration.

Make pixel-exact subpixel rendering tests disable HiDPI so their
framebuffer dimensions remain deterministic on Retina displays.

Avoid executing native menu key equivalents twice when SDL also forwards
the same key-down event through eepp's keybinding dispatcher.

Preserve native menu item activation for mouse clicks.

Hide the "Hold Shift to keep menu open" hint while the native macOS menu
bar is enabled.
2026-09-01 11:56:49 -03:00
Martín Lucas Golini cff165fa37 Build fix for macOS + premake4 + brew sdl2 2026-09-01 03:20:08 -03:00
Martín Lucas Golini 5ffe6da00c Build ecode macOS nightly using frameworks (brew SDL2 is broken because it points to sdl2-compat, will fix later). 2026-09-01 03:06:56 -03:00
Martín Lucas Golini 47f9336c0a Add optional LTO and harden Windows clipboard handling
- add --with-lto support to Premake 4 and 5 release builds
  - use ThinLTO with Clang, automatic LTO with GCC, and LTCG with MSVC
  - exclude Emscripten builds from LTO configuration
  - retry SDL2 clipboard writes on Windows when the clipboard is temporarily unavailable
  - make the UIMergeView copy regression test independent of the system clipboard
2026-09-01 00:46:13 -03:00
Martín Lucas Golini 58ab838f6f Merge branch 'develop' into feature/eterm-worker 2026-08-31 19:22:24 -03:00
Martín Lucas Golini 6e467dbb59 Various general optimizations, inlined a bunch of functions, did a bunch of optimizations in UICodeEditor::drawMinimap, render times are about +10% faster for some common ecode escenarios. 2026-08-31 19:21:25 -03:00
Martín Lucas Golini 87431fe706 Merge branch 'develop' into feature/eterm-worker 2026-08-31 11:06:17 -03:00
Martín Lucas Golini 36200430aa Fix conflict discard and merge view copy commands
- add Discard actions for conflicted files and conflict groups
  - restore discarded conflicts from HEAD in both index and working tree
  - restrict regular discard actions to changed tracked files
  - preserve default editor commands when replacing an editor document
  - enable copying from the read-only merge-view side panels
  - cover conflict restoration and merge-side copying
  - document build parallelism and function-spacing conventions
2026-08-31 11:03:19 -03:00
Martín Lucas Golini c5c6350920 eterm: harden threaded presentation and terminal protocol handling
- preserve CSI subparameter separators for modern SGR color sequences
  - fix synchronized updates and periodic presentation under sustained output
  - support OSC palette queries, resets, and color scheme notifications
  - implement alternate scroll, cursor style, and terminal version queries
  - preserve the configured cursor shape for default blinking cursor requests
  - recognize Kitty keyboard negotiation without falsely advertising support
  - recognize OSC 8 hyperlink markers without emitting parser errors
  - make release parser diagnostics opt-in through ETERM_LOG_ERRORS
  - update the Kitty keyboard protocol implementation plan for worker ownership
  - add regression coverage for rendering, colors, CSI modes, cursors, and OSC 8
2026-08-31 03:01:40 -03:00
Martín Lucas Golini bfa9b6ab60 Rename TerminalController to TerminalSession. 2026-08-31 01:15:28 -03:00
Martín Lucas Golini d0aa310362 Fix compilation issues with older C++ versions. 2026-08-30 22:15:14 -03:00
Martín Lucas Golini 8bcec85da0 Move eterm emulation off the UI thread and add tabbed frontend
- introduce a per-terminal worker controller with ordered command queues,
    coalesced events, immutable snapshots, and deterministic shutdown
  - move PTY reads, parsing, history, selection, resize, reflow, and process
    status handling onto the terminal worker
  - publish terminal snapshots at the host refresh rate while preserving
    immediate idle, resize, interaction, and final-exit presentation
  - migrate TerminalDisplay, UITerminal, eterm, ecode, debugger, and ACP
    integrations away from direct mutable emulator access
  - synchronize scrollbar updates with acknowledged scroll commands
  - preserve title, clipboard, bell, prompt, color, restart, keep-alive,
    selection, input, and buffered process-exit behavior
  - add bounded synchronous selection requests and idempotent worker shutdown
  - make POSIX process launch safe after fork in multithreaded hosts and mark
    original PTY descriptors close-on-exec
  - add an UIApplication-based tabbed eterm with legacy CLI parity, tab
    lifecycle handling, close warnings, and default navigation shortcuts
  - add premake targets and deterministic controller, snapshot, lifecycle,
    concurrency, presentation, and exit-drain tests
2026-08-30 20:25:44 -03:00
Martín Lucas Golini 7c92b59e00 Fix CI build pt. 2 2026-08-30 20:04:50 -03:00
Martín Lucas Golini f9f14df3ab Fix builds. 2026-08-30 19:00:53 -03:00
Martín Lucas Golini 8e5d180a4d Optimize editor initialization and multi-file diff loading
- Share immutable built-in document commands, editor command tables, default keybindings, and syntax color scheme storage across editor instances. Preserve mutations through copy-on-write storage and explicit command-removal tracking.
  - Use ShortcutMap consistently with unordered lookup while retaining deterministic ordering where serialization or conflict resolution depends on it. Cache ambiguous syntax-extension checks and invalidate the cache when language definitions change.
  - Prepare Git commit-detail diffs and sub-line changes on worker threads with cancellation and stale-request protection. Release raw patch memory before UI construction and add regression coverage for prepared and cancelled diffs.
  - Add Diff Changed support and enable collapsible file headers for Diff HEAD, Diff Staged, and Diff Changes.
  - Update translations, compatibility call sites, tests, and the efsw dependency.
2026-08-30 17:35:50 -03:00
Martín Lucas Golini 3afcb3f2d2 Optimize bulk editor setup, deferred UI resources and Git plugin fixes
- Lazily compute document line hashes, avoid redundant multiline insertion
walks, and defer longest-line measurement for large or exceptionally long
text changes.

- Cache default code editor keybindings, reserve common command storage, and
create UIDiffView image viewers only when an image diff requires them.

- Keep cached screen positions coherent when descendants are queried before
dirty ancestors, and add regression coverage for ancestor movement.

- Relocate font-rendering golden images into the unit-test asset directory
and resolve image fixtures independently of the current working directory.

- Fix spurious status entries for files moved between directories. Preserve the suffix after Git's abbreviated brace notation when parsing renamed paths from numstat output. This prevents directory moves such as `bin/{ => unit_tests}/assets/...` from producing truncated synthetic untracked entries like `unit_tests`. Add regression coverage for staged files moved into a different directory.

- Git Plugin now remembers between sessions the uncommited commit message.
2026-08-30 01:05:24 -03:00
Martín Lucas Golini caba2d4462 Optimize bulk document insertion and IME location updates
Build multiline TextDocumentLine values once and move-insert them as a range, while batching client notifications under one lock.

Queue InputMethod location changes globally and flush only the latest rectangle at a configurable 50 ms interval. Keep backend calls on the main thread and avoid requests from unfocused text widgets. Use EEPP_IME_LOCATION_UPDATE_INTERVAL_MS to override the interval; 0 flushes once per rendered frame.

Add large multiline insertion coverage and document the remaining NewMultiFileDiffViewer performance work.

Enable Haiku x86_64 nightly builds
2026-08-29 22:21:55 -03:00
Martín Lucas Golini 7dd21fa77c Improve tag creation and add UITextEdit hint support
Add native hint text support to UITextEdit, matching UITextInput behavior and exposing configurable hint text, color, font, size, style, shadow, outline, and HintDisplay modes. Render hints only for empty
documents and preserve the correct drawing order beneath the caret.

Expose the corresponding hint CSS properties through UITextEdit and apply the theme hint color to TextEdit and TextArea widgets.

Add an “Add Tag & Push” action alongside local-only tag creation. Push only the newly created tag using an explicit refspec and the current branch’s tracked remote, falling back to origin.
2026-08-29 20:28:27 -03:00
Martín Lucas Golini 780ede23f9 Optimize UISceneNode style invalidation batching
Defer dirty-descendant coalescing until style processing instead of
scanning the dirty set and walking widget ancestry on every invalidation.
Preserve parent-first early-outs and resolve dirty roots against the
current widget tree using shared snapshot storage.

Clear stale style-state animation entries when widgets are deleted and
add regression coverage for large invalidation bursts and reparenting.
2026-08-29 19:46:37 -03:00
Martín Lucas Golini e39e82fe55 Optimize UIDiffView::NewMultiFileDiffViewer to not trash children creation with invalidations. 2026-08-29 19:02:26 -03:00
Martín Lucas Golini 0fa99ab9d2 Expand Git History actions and branch management
- Add SmartGit-inspired context actions to Git History commits, including checkout, merge, fast-forward merge, cherry-pick, revert, branch creation, tag creation, and copying commit IDs or complete messages.
  - Order commit actions into consistent operation, ref-creation, and clipboard groups. Hide the redundant Show in Git History action inside detached history tabs while retaining it in the source-control sidebar.
  - Add a Working Tree / Index context menu with status-aware Commit and Stage actions. Track staged and unstaged availability in the history model and keep it synchronized as repository status changes.
  - Extend the Git command wrapper with operations for creating branches at commits, creating and deleting tags, deleting remote branches, cherry-picking commits, and reverting commits.
  - Support deleting tags and remote branches from the Branches view. When deleting a local branch with an upstream, optionally delete its tracked remote branch as part of the operation.
  - Add confirmation and input dialogs for branch, tag, remote-deletion, and revert workflows. Disable history-changing commit actions while another Git operation is active.
2026-08-29 15:11:08 -03:00
Martín Lucas Golini b3d72b5acf Fixed the autocomplete crash, root cause: getDocumentSymbols() accessed mDocs from a worker thread while document lifecycle callbacks could concurrently modify the same unordered_set, corrupting its internal state.
Added a synthetic “Working Tree / Index” first row whenever the selected repository has local or staged changes.
Displays separate changed and staged counts.
Updates dynamically from normal status refreshes without reloading commit history.
Selecting it opens the shared details view in “Uncommitted changes” mode.
Shows tracked changes from HEAD through the working tree, plus untracked-file patches.
Supports both sidebar and detached History views.
The History shortcut focuses working changes when present, otherwise the newest commit.
Added the History button beside Refresh.
Added consistent 2dp spacing between the ref dropdown and both buttons.
Added translations for the new labels.
2026-08-29 03:12:27 -03:00
Martín Lucas Golini 61d9d3c7bc Improve Git History navigation and commit details
Add a detached Git Commit History tab with a traditional table layout, persistent column widths, commit focusing, and a splitter-based commit details pane.
Register the git-show-history command and expose “Show in Git History” from commit details and history context menus. Add History and Git Commit tab icons, localized titles, appropriate tooltips, and ref-aware
tab naming.
Share the commit-details layout and behavior between standalone commit tabs and detached History views. Move view creation, widget binding, state management, controls, and asynchronous changed-file loading into
CommitDetailsState.
Display complete commit metadata and messages, GitHub links, copyable commit SHAs, colored changed-file statistics, and multi-file diffs with global expand/collapse and unified/split controls.
Improve detached-history lifecycle behavior, selection and focus handling, stale-request protection, tooltip formatting, and column recalculation. Restore “Load older commits” by preserving pagination-node
semantics while asynchronous loading is in progress.
Fix expandable History rows so merge subjects and metadata render correctly without regressing generic UITreeView cells. Add recursive commit lookup for focusing nested history entries.
Add deferred tooltip-created notifications and configure History tooltips only after their widgets exist.
Preserve tokenizer-applied UITextView color ranges during layout recalculation when custom styling is enabled, preventing changed-file statistics from losing their colors after splitter resizing.
Add the required Codicons and translations, expose UIWidget pseudo-class queries, reuse cached tree-expander drawable sources, and use SmallVector for nested stylesheet property resolution.
2026-08-29 02:15:26 -03:00
Martín Lucas Golini ef962fc61f Improve Git History navigation and asynchronous UI safety
Add a History ref selector for HEAD, local branches, remote branches, and tags without requiring checkout. Reuse cached branch-model display strings to keep large ref lists efficient.
Make deferred main-thread callbacks lifetime-safe across ecode controllers and plugins. Initialize plugin dispatchers during UIReady and extend MainThreadLifetime to support delayed and tagged dispatch.
Fix expandable Git History rows, empty merge projections, and commit-description expansion. Display only the physical first line while collapsed and avoid duplicating it in the expanded body.
Add coverage for history ref handling and preserve stale-request guards during repository and revision changes.
Fix UIImageViewer dimension reporting for sprites by displaying the underlying texture dimensions.
The Git History interface remains a work in progress.
2026-08-28 18:52:04 -03:00
Martín Lucas Golini baaa0a62c0 Add a work-in-progress Git History view to the source-control panel.
Display bounded first-parent commit history with asynchronous loading, independent pagination, and lazily expandable merge commits. Propagate inherited exclusions through nested merges to avoid repeating already represented history.
Add custom compact history rows, loading/error/retry states, keyboard navigation, repository and history-generation guards, and lifecycle invalidation after history-changing operations.
Add a commit details tab with full commit metadata and message, changed-line totals, GitHub links when available, and a multi-file diff viewer with global collapse and unified/split controls.
Extend UIDiffView with multi-file view controls and register the required Codicons.
The Git History interface and visual design remain a work in progress.
Fix caret positioning inside shaped ligature clusters.
Add explicit closest-glyph and interpolated ligature caret-positioning modes while keeping interpolation as the default for general text geometry.
Use the original closest-glyph behavior for caret and IME positioning in UICodeEditor, UITextEdit, UITextInput, and UIConsole, preventing cursor positions from being synthesized inside ligature glyphs.
Add regression coverage for both positioning modes.
Optimize SyntaxTokenizer by returning tokenizer results in a SmallVector, avoiding heap allocations in common cases.
2026-08-28 14:43:05 -03:00
Martín Lucas Golini 66d22ea5bb Add integrated Git conflict resolution workflow
Introduce a three-pane UIMergeView with an editable shared result
document, conflict navigation and acceptance actions, live diff
highlighting, synchronized scrolling, and contextual pane labels.

Read conflict stages directly from Git's index, detect paused merge
operations, restore conflict sessions, and support resolving, staging,
recreating, continuing, committing, and aborting operations.

Add repository-aware conflict state handling, safe asynchronous
lifetimes, merge operation UI, configurable key modifiers, i18n
strings, and focused merge-view and Git conflict tests.
2026-08-27 22:18:58 -03:00
Martín Lucas Golini 7d322a035f Add secondary modifier support. 2026-08-27 12:42:33 -03:00
Martín Lucas Golini 99e0f5aef4 AI Assistant Plugin: do not send empty assistant messages, this will break some APIs (it was accidental). 2026-08-27 01:07:35 -03:00
Martín Lucas Golini 7f6568cfb0 Allow to configure the default diff view (Unified vs Side by side) 2026-08-26 17:43:57 -03:00
Martín Lucas Golini f5effbad91 Fix FileSystemModel UAF during queued delete events
- Avoid re-querying rowCount() after resolving a node for deletion, since this could traverse a lazy parent and delete the node before the operation finished using it.

  - Use the resolved model index to begin row deletion, silently repair view selections before notifying model clients, and avoid traversal-capable index lookups while raw nodes are retained.

  - Add ASAN regressions for Add/Move/Delete sequences involving unopened directories, moved directory descendants, stale selections, and re-entrant selection callbacks.
2026-08-26 16:41:11 -03:00
Martín Lucas Golini 6e00798c6c Settings Panel fixes.
Fix Haiku default modifier.
2026-08-26 15:16:45 -03:00
Martín Lucas Golini 09b806faad Fix Settings Panels mouse click registered only with left mouse click. 2026-08-26 01:43:46 -03:00
Martín Lucas Golini a182878837 ecode: add structured settings pages for plugins
- introduce reusable settings models, documents, and plugin settings pages
  - expose all registered plugin configuration options in the Settings panel
  - support groups, choices, editable values, lists, secrets, and JSON objects
  - stage plugin changes and persist them when the Settings window closes
  - preserve raw JSON access for advanced configuration
  - safely migrate legacy AI provider API keys
  - add translated plugin setting labels and descriptions
  - remove the obsolete plugin GUI configuration API
  - fix autocomplete signature documentation persistence
  - fix AI model catalog refresh interval loading
2026-08-26 01:37:28 -03:00
Martín Lucas Golini 42d9dd6473 ecode: decouple and lazily render settings panel entries
- introduce typed, widget-independent settings descriptors
  - separate settings registration from UI materialization
  - construct setting rows only for visible categories and search results
  - preserve category, aggregate view, subgroup, and disabled-state behavior
  - validate duplicate IDs and unknown category references
  - debounce settings filtering and ignore single-character searches
  - avoid temporary allocations while matching category names
2026-08-25 23:40:19 -03:00
Martín Lucas Golini 6b0646ab48 Merge branch 'feature/ecode-settings-panel' into develop 2026-08-25 00:37:34 -03:00
Martín Lucas Golini 7b5188dd67 Fix click toggle in setting_name and setting_description. 2026-08-25 00:35:18 -03:00
Martín Lucas Golini 43dec0ffb5 Merge branch 'develop' into feature/ecode-settings-panel
# Conflicts:
#	src/tools/ecode/settingsmenu.cpp
2026-08-24 19:20:47 -03:00
Martín Lucas Golini 55ad998de1 Use Nearest filter in eeiv images by default. 2026-08-24 19:10:54 -03:00
Martín Lucas Golini c97aff1e96 Nit. 2026-08-24 18:27:16 -03:00
Martín Lucas Golini 34c58d531e Focus filter input by default in settings panel. 2026-08-24 17:36:10 -03:00
Martín Lucas Golini ab4a6fb7c6 Changed the boolean click target to the entire text-information column. 2026-08-24 17:17:31 -03:00
Martín Lucas Golini 0d2e09f654 Implemented two more eager-construction optimizations:
- Each option now uses one complete XML template containing both its row and control.
  - Those immutable XML templates are parsed once and reused through loadLayoutNodes().
2026-08-24 16:29:07 -03:00
Martín Lucas Golini bc98615590 Some minor optimizations to take advantage of UIDropDownModelList (which is faster) and fixed a couple or minor issues in it. 2026-08-24 16:05:38 -03:00
Martín Lucas Golini 932c00ae4f ecode: add centralized settings panel and simplify settings menus
- add searchable user and project settings panels
  - organize settings into navigable categories and subsections
  - apply supported configuration changes in real time
  - add direct document and terminal settings accessors
  - retain only contextual actions in the legacy settings menus
  - replace legacy configuration dialogs with inline controls
  - improve modal behavior, keyboard navigation, and persistence
  - add validation for editable settings
  - update and remove obsolete i18n strings
2026-08-24 15:16:17 -03:00
Martín Lucas Golini 30cf6d9e97 ecode: add centralized settings panel
- add user and project settings windows with searchable tree navigation
  - centralize setting definitions with reusable bool, choice, text, numeric, and action controls
  - apply supported configuration changes reactively
  - add inline validation and editable choices for complex value types
  - disable project document options while inheriting global settings
  - migrate font, theme, language, renderer, screenshot, and terminal settings
  - improve keyboard navigation and modal shortcut isolation
  - make configuration dialogs modal
  - persist settings when the panel closes
  - add responsive dark and light theme styling
  - update translations for new settings labels and descriptions
  - add regression coverage for modal keybinding propagation
2026-08-24 13:07:43 -03:00