Commit Graph
2262 Commits
Author SHA1 Message Date
Martín Lucas Golini a8eb1834eb Add tabbed HTML browsing and extend eepp navigation and input support
eepp framework:
- Add shared cookie jars to UISceneNode and UIWebView, plus versioned
  CookieManager persistence, domain clearing, and locking in hasCookie().
- Follow HTTP 303 redirects and merge same-host redirect cookies as
  name/value pairs without forwarding Set-Cookie attributes.
- Include Cookie headers in document cache keys while preserving static
  resource reuse as cookies change.
- Submit HTML forms with an empty action to the current document URL.
- Extend NavigationRequest with source, mouse buttons, modifiers, and
  navigation target; anchors forward this context to the scene.
- Emit OnLinkOpenRequested for middle-click, platform-modifier click,
  and explicit new-tab requests, with current-view fallback if unhandled.
- Install the WebView navigation interceptor during construction.
- Dispatch middle clicks to the hovered node without moving keyboard focus.
- Add the clicked target to ContextMenuEvent so applications can extend
  context menus through existing events.
- Parse HTML titles, emit TitleEvent, and fix onTitleChanged's payload cast.
- Load declared favicons through the shared image cache, emit
  OnFaviconChanged, and ignore responses from superseded navigation.
- Add optional UITabWidgetSplitter tab-bar visibility while split;
  keep it disabled by default and respect explicitly hidden tab bars.
- Add Space/Shift+Space scrolling and viewport-sized Page Up/Down steps
  to UIScrollView, shared by WebView and Markdown content.
- Implement setEnableDefaultKeybindings() and preserve text-input
  priority through normal bubbling without control-type checks.
- Report inserted UICodeEditor text as handled.
- Add UITextView::onFontColorChanged() and synchronize password-mask color.
- Support validated left, middle, and right clicks in the inspector
  server and Python client.

ui_html example:
- Use UITabWidgetSplitter for tabs and user-controlled splits.
- Share cookies and the resource cache across tabs; persist cookies
  between sessions and open new tabs blank.
- Add Inspect, Clear Domain Cookies, Clear All Cookies, and contextual
  Open Link in New Tab actions through menu event subscriptions.
- Open requested links in background tabs and synchronize navigation UI.
- Use document titles and 16dp favicons for tabs, cap width at 200dp,
  and truncate long titles with ellipsis.
- Enable tab-bar visibility across split panes.
- Fixed: the selection rectangle now uses the visible password symbols instead of the original text.

Update HTML compatibility and inspector documentation and add regression
coverage for persistence, redirects, cache isolation, navigation, menus,
titles, favicons, password colors, split visibility, and scrolling.
2026-09-29 18:58:51 -03:00
Martín Lucas Golini a090d1a666 Fix CSS state rollback for transient properties. eproc: add keyboard navigation between search and process views, fix Send Signal menu events.
Store native and inherited fallback values outside local styles, then restore them when state rules stop matching. Handle indexed properties across overlapping states and retain a serialized value when an inherited source disappears. Add rollback regression tests and update the CSS documentation

Focus and select the first process row when pressing Down in the search input. Pressing Up from the first row returns focus to search in both table and tree views.
2026-09-29 14:56:01 -03:00
Martín Lucas Golini 850f33c336 Polish app icon sizing and bump eepp and ecode versions
Generate size-aware macOS icons and separate runtime Dock PNGs for ee,
ecode, eterm, eeiv, and eproc. Keep shared PNGs sized for small Linux
icons, and package ecode's macOS runtime icon.

Bump eepp to 5.0.0 (Kittima-attā) and ecode to 0.9.0 (Yanta-lekhā).
2026-09-29 01:02:07 -03:00
Martín Lucas Golini ee0d9378ad Expand UI documentation and refine link context menus
Add guides for native UI authoring, layouts, application CSS, and HTML
compatibility. Update the CSS reference, rename article files consistently,
and point README links to the local guides.

Add Copy Link for HTML and Markdown anchors when no text is selected.
Resolve relative links against the document URI before copying, and cover
Markdown and WebView behavior with tests.

Fix layout width policy serialization to use the widget's width.
2026-09-28 19:20:34 -03:00
Martín Lucas Golini fd5a3718d4 Renamed UIStackLayout to UIFlowLayout throughout the engine and its usages, including the header and source files, XML tag, runtime type, widget factory, docs, and typed lookups. The layout behavior is unchanged. Separate UIStackWidget and debugger stack views retain their names. 2026-09-28 15:25:56 -03:00
Martín Lucas Golini 5db8d78725 - SocketSelector::isReady() (src/eepp/network/socketselector.cpp:111) no longer treats a Windows socket handle as an FD_SETSIZE index. That check prevented the inspector server from responding.
- Token generation (src/eepp/ui/tools/uiinspectorserver.cpp:67) now uses `BCryptGenRandom` on Windows, including for screenshot filenames.
- Split basic HTML defaults from document and form styles
- Load only structural defaults for Markdown views, leaving document colors and form-control styles to full HTML documents. Add Breeze styling for Markdown horizontal rules and HTML textareas.
2026-09-28 11:45:35 -03:00
Martín Lucas Golini 542075cca6 **fix(ui): prevent MSVC from generating UIInspector copy operations**
`UIInspector` owns move-only event connections. Explicitly delete its copy constructor and assignment operator so MSVC does not instantiate invalid copies of the handle maps. Restore the dense map implementation
2026-09-28 10:51:16 -03:00
Martín Lucas Golini 27bfbb4b3a * UIInspector now stores move-only event connections in a node-based map, avoiding the MSVC vector copy error.
* Batch results now initialize as a JSON object. The previous initialization created an array, causing both reported Linux and macOS test failures.
2026-09-28 10:10:44 -03:00
Martín Lucas Golini 4ffba20d07 feat(ui): add runtime inspector and fix HTML layout regressions
Add an opt-in TCP/NDJSON inspector for running eepp applications. It
provides authenticated, UI-thread-safe access to windows, scenes, and
widgets, including nested WebView documents. The v1 protocol supports
queries, trees, properties, focus, input actions, watches, screenshots,
and composed batches with result references and deferred execution.

Add a standard-library Python CLI, protocol documentation, build
entries, and integration tests. The listener remains disabled unless
explicitly enabled.

Fix HTML compatibility issues found while debugging NewsBlur:
- Let explicit flex minimums, including min-width: 0, replace the
  automatic content minimum.
- Measure flex lines against the container content box when padding
  and explicit dimensions are present.
- Keep promoted positioned descendants of hidden ancestors out of
  the paint list.
2026-09-28 01:15:39 -03:00
Martín Lucas Golini 1174e97911 Add optional filled areas to UI chart lines
Allow each LineSeries to fill down to the plot’s bottom edge, using a translucent version of its line color by default or a custom fill color. Render overlapping fills beneath the strokes, document the new API, and demonstrate it in the charts example. Add coverage for blending, data gaps, and toggling fills.
2026-09-26 23:59:19 -03:00
Martín Lucas Golini 2d7623c5fa Fix Windows build. 2026-09-26 23:30:00 -03:00
Martín Lucas Golini ec7c3c45dd Add document-level text selection to HTML and Markdown views
Introduce UITextSelectionController to coordinate selection across independent
RichText owners while retaining RichText hit testing and painting. Support
forward and reverse dragging, nested content, gap hit testing, autoscroll,
plain-text copy, select-all, and context menus.

Enable UIRichText and UITextSpan selection by default. Add CSS user-select
semantics and the -webkit-user-select alias, while preserving the separate
text-selection capability flag.

Clear selection safely when owners or documents are destroyed, suppress link
activation after a selection drag, and add regression tests, documentation,
and an updated rich-text example.
2026-09-26 22:11:32 -03:00
Martín Lucas Golini de040ef17e Add eproc settings and macOS/FreeBSD per-core CPU metrics
- Add persistent eproc settings for refresh interval, appearance, fonts,
    and renderer options, with a settings button in the main window.
  - Collect per-core CPU usage on macOS and FreeBSD for Performance charts.
  - Keep the settings search focused in eproc and eterm, and wrap long
    setting names.
  - Share macOS theme-colored titlebar handling across ecode, eproc,
    and eterm.
  - Stabilize fixed-size UI tests on Retina displays and prevent macOS
    build scripts from starting unlimited jobs when sysctl fails.
2026-09-26 01:44:10 -03:00
Martín Lucas Golini 8df1298470 eepp: add UI environment overrides and theme-aware eproc colors
Use Breeze theme colors for eproc's process table and Performance charts,
while preserving the translucent Username colors. Keep process icons
visible in the light theme with a white tint.

Add eproc CLI options for font hinting, font antialiasing, and color scheme.
Add -c/--prefers-color-scheme to eterm and retain close-on-exit through
its long options.

Support EEPP_FONT_HINTING, EEPP_FONT_ANTIALIASING, and EEPP_COLOR_SCHEME
across eepp UI apps, with valid environment values taking precedence
over application settings. Document and test the overrides.
2026-09-25 22:59:58 -03:00
Martín Lucas Golini 1de732962d Add eproc Performance view and family memory metrics
- Add CPU, memory, GPU, and network charts with ten-minute history,
  a 60-second view, clickable cards, and overall or per-core CPU views.
- Add Family Memory and Family Memory % to both process views. Use
  proportional memory on Linux, count zero-memory zombies correctly,
  and collect the data after the first frame without delaying it.
- Add column tooltips, rename Total Memory to Resident Memory, keep
  Command last by default, and migrate saved column layouts.
- Enable sorting within each tree level and preserve selection.
- Improve eepp chart margins and sorting behavior, and document UIChart.
2026-09-25 16:22:00 -03:00
Martín Lucas Golini f2ab50f2d8 Add chart grids, smoothing, and rotated tick labels
- Add configurable vertical and horizontal grids with axis tick, data,
  and screen spacing modes.
- Add monotone cubic line smoothing and angled X-axis tick labels.
- Return references for chart APIs that always have a result, and document
  model ownership and borrowed references.
- Prevent empty tooltips and refresh chart hover when live data changes
  under a stationary cursor.
- Update the charts example and add rendering and tooltip regression tests.
2026-09-25 12:26:11 -03:00
Martín Lucas Golini b3e6ea559d Add pixel-density default and improve chart rendering
- Honor EEPP_PIXEL_DENSITY when an app has not specified a scale,
  without resizing its window.
- Scale chart measurements in dp, expose chart styling, and resolve
  default colors through the UI theme.
- Fix gaps at miter joins and round chart text to device pixels.
- Use inline storage for common chart axis, series, and label counts.
- Add density and rendering regression tests.
2026-09-25 10:51:55 -03:00
Martín Lucas Golini 7a66563114 Add eepp charts module and interactive example
Implement chart axes, line series, data sources, pixel-bucket reduction,
tooltips, and pan, zoom, fit, and live-follow interactions. Register Chart
as a default UI widget and expose the new APIs through ui.hpp.

Add a responsive four-chart example, benchmarks, and unit tests. Reuse
rendering buffers and fix ring-buffer rendering and hover tooltip behavior.
2026-09-24 21:16:52 -03:00
Martín Lucas Golini d551ac170c Expand eproc and improve eepp table and tree views
Add process columns, GPU metrics, tree mode, multi-process actions,
GUI and tray detection, and persistent filter and table settings.

Add optional column header reordering to eepp table and tree views.
Keep dragged headers in place during refresh and draw them above other
headers. Preserve row selection when sorting and when opening context
menus, and support application items in header context menus.

Refresh eepp and tool icons and add the icon generation script.
Add tests for the process views, icon decoding, and GUI table behavior.
2026-09-23 20:57:34 -03:00
Martín Lucas Golini 61ca3844ba Fix splitter widget callbacks being dropped on tab moves
* Fix UICodeEditorSplitter dropping its widget listeners on tab moves:
    UITabWidget reports drag & drop transfers as OnTabClosed + OnTabAdded,
    so treating OnTabClosed as "left the splitter" permanently unhooked the
    moved widget and left mCurEditor/mCurWidget tracking nothing
    (SpartanJ/ecode#958).
  * Tie splitter-owned callbacks to splitter membership: attach on
    OnTabAdded of managed tab widgets, detach on OnTabClosed. Creation and
    transfer now share one registration path; moves to external tab
    widgets stay detached.
  * Keep mEditorSelections for the editor lifetime instead of the tab
    membership lifetime: it survives split moves and is cleared from the
    editor OnClose callback, which is disconnected in the splitter
    destructor so outliving editors cannot call into a destroyed splitter.
  * Apply the same ownership model to UITabWidgetSplitter, which had the
    inverse bug: widgets dragged out kept notifying the splitter through
    stale connections; drop the duplicated closeTab() cleanup.
  * Store listeners as Scene::EventConnection/List (RAII disconnect)
    instead of std::vector<Uint32> + removeEventListener bookkeeping.
  * Add regression tests covering editor and generic widget moves between
    splits, in and out of the splitter, focus/title tracking after each
    transition, selection cache survival, and editor destruction cleanup.
2026-09-22 14:00:11 -03:00
Martín Lucas Golini 7a63e13070 Fix eproc not displaying the full command. Fix UITableHeaderColumn mist-firing a sort after drag. 2026-09-22 01:30:27 -03:00
Martín Lucas Golini f200850941 Fix eterm tab closing and macOS menu integration
* Serialize tracked realloc and free bookkeeping to prevent cross-thread
    address reuse from corrupting the memory tracker during tab teardown.
  * Add concurrent allocation and terminal close/resize regression coverage.
  * Install a macOS-only File, Edit, and Window menu that mirrors eterm
    keybindings without binding Cmd+W.
  * Keep the native menu outside the splitter layout and document the canonical
    macOS build workflow.
2026-09-21 21:39:39 -03:00
Martín Lucas Golini e2174aa044 feat(ecode): add Git diff gutter and minimap indicators
Compute document line changes asynchronously against the repository
baseline and render added, modified, and removed markers in the editor
gutter and minimap.

Keep diff indicators disabled by default to avoid unexpected background
work. Add settings for enabling them and configuring the debounce delay,
with translations for all supported locales.

Handle fully added files, stale asynchronous results, document lifetime,
repository changes, and unsaved edits. Add focused Git diff and document
serialization regression coverage.

Vendor a reduced simdutf build and use it to accelerate String UTF-8 and
UTF-32 conversion and codepoint counting. Preserve efficient scalar and
cached-ASCII paths while reusing output storage for document snapshots.
Add simdutf to the Premake 4, Premake 5, and Android builds.

Fix UIConsole wheel and keyboard scrolling, and repair its text cache by
hashing log entries before moving their strings. Initialize cache hashes
and add regression coverage for scrolling and moved log entries.

Preserve debugger response data when notifying multiple listeners by
copying for all but the final listener. Remove an evaluation-order hazard
when capturing and submitting URIs for asynchronous document loading.

Refs SpartanJ/ecode#955.
2026-09-21 18:05:23 -03:00
Martín Lucas Golini 53f1fe6045 perf(ui): store Variant values inline
Replace Variant's heap-owned payloads with manually managed inline
  storage while preserving its return-by-value API.

  - inline std::string, String, DrawablePtr, Vector2f, and Rectf
  - add move construction and capacity-preserving assignment
  - add explicit borrowed std::string support and string views
  - avoid redundant conversions in table and tree hot paths
  - borrow stable process fields in eproc
  - eliminate per-frame eproc class allocation churn
  - focus the eproc search input on startup
  - add comprehensive Variant lifecycle and ownership tests
2026-09-21 02:37:11 -03:00
Martín Lucas Golini 51b88fa125 fix(ui): harden asynchronous document search
Snapshot document search state before dispatching highlight workers and
retain the searched document for the duration of each job.

Publish results through MainThreadLifetime and reject results when the
editor has changed document or search parameters. Remove the obsolete
worker counter and destructor wait used for editor lifetime management.

Use atomic cancellation flags in TextDocument::findAll() and protect
active-search map inspection during destruction.

Add regression coverage for concurrent cancellation, stale highlight
results, rapid backtick searches after a large multiline paste, and
editor destruction during active search.

Refs SpartanJ/ecode#956.
2026-09-21 01:55:58 -03:00
Martín Lucas Golini d885c6b31a Update svector and unordered_dense to its latest releases. 2026-09-19 21:52:07 -03:00
Martín Lucas Golini b838a42fee Fix lTrim/rTrim asymmetry with trim. Fix readBySeparator on an empty buffer.
Reuse RegEx match data and bound the pattern cache.

lTrim and rTrim returned an all-separator string unchanged where trim() returns empty;
all sixteen overloads now drop everything when no non-separator is left.
readBySeparator handed the callback one empty chunk for an empty buffer; it hands none
now, as the UTF-32 overloads already did.

RegEx::matches allocated its match data per call, four allocations per row while
filtering over a table. It is created once per object now, held by a unique_ptr whose
deleter knows the engine, so the destructor no longer repeats that split. RegEx is
movable but not copyable: it was implicitly copyable while owning that block, and a
copy taken after a match released it twice. syntaxtokenizer.cpp was copying its
std::variant temporary because the user-declared destructor suppressed the implicit
move; it moves now.

RegExCache held two unordered_maps, hash to pattern and hash to options, and never
evicted. It is one DynamicLRU<8192, size_t, shared_ptr<void>> now: the engine lives in
each pattern's deleter so the options map is gone, and values own the pattern, because
an eviction must not free one a live RegEx is still matching with. That also fixes a
racing insert that leaked the loser's pattern. The bound leaves ample room over the
working set and cache hits stay allocation-free (0 new, 0 malloc per 1000
constructions). New tests: lTrimAndRTrim, readBySeparator, splitCb, cacheIsBounded.
Release and AddressSanitizer suites pass 1216 tests each.
2026-09-18 17:12:13 -03:00
Martín Lucas Golini c100d93896 Fix String::trim on all-separator input. Fix RegEx freeing Oniguruma patterns.
String::trim: when the input consisted only of separators, both find_first_not_of
and find_last_not_of returned npos and the pos2 fallback computed length() - 1, so
trim("  ") returned " " and every all-separator value came back one character
shorter instead of empty, making an all-whitespace value look non-empty to callers.
All eight overloads were affected: std::string, std::string_view, String and
String::View, in their char and separator-set forms. Return an empty result when
there is no non-separator, and compute the trimmed range as
substr(pos1, pos2 - pos1 + 1).

RegEx: mCompiledPattern stores whichever engine compiled the pattern, a pcre2_code*
or an OnigRegex, but the destructor released it with pcre2_code_free() whenever
RegExCache did not own it. With useCache = false that freed an Oniguruma pattern as
a PCRE2 block, which corrupts the heap: constructing and destroying such a RegEx
crashes with SIGSEGV, a path snippetparser.cpp reaches by passing Utf |
AllowFallback with useCache = false. Release the pattern with the deallocator of the
engine recorded in Options::UseOniguruma, the predicate matches(), getCaptureCount()
and RegExCache::clear() already use, and remove the mOnigEngine flag, which was
never set or read anywhere.

Both fixes come with regression tests. String.trim covers the all-separator boundary
and the trimmed range of every overload. RegExEngines.uncachedPatternIsFreedByItsOwnEngine
destroys uncached patterns from both engines; it crashed the test binary before the fix.
2026-09-18 15:51:39 -03:00
Martín Lucas Golini 128abc692e Fix UIDropDown listbox mis-positioning.
Fix sort indicator in UIAbstractTableView not displaying when sorted.
2026-09-18 13:59:11 -03:00
Martín Lucas Golini c530e4bd6e feat: add cross-platform file association management
Add an EE::System::FileAssociation abstraction with XDG, Windows,
and macOS implementations.

Expose extensions from syntax predefinitions and add custom widget
support to UISettingsPanel. Add an ecode settings page for selecting
file associations and installing an XDG desktop entry.

Apply changes asynchronously with lifecycle-safe UI handling, disable
controls while applying, and avoid redundant XDG database updates.

Add translations and coverage for the new functionality.

Implements SpartanJ/ecode#192
2026-09-17 11:04:25 -03:00
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 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 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 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 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 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 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 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 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 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 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 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