Commit Graph

4663 Commits

Author SHA1 Message Date
Martín Lucas Golini
e269d65e01 Fix a couple of false positive unit-tests in Linux. 2026-08-23 18:12:42 -03:00
Martín Lucas Golini
301b7458d2 graphics: improve native system font fallback
Initialize SystemFontResolver when enabled and make its lifecycle and font-list
population thread-safe.

Use native codepoint fallback matching through Fontconfig on Linux, BSD, and
Haiku, DirectWrite on Windows, and Core Text on macOS and iOS. Preserve the
cached FreeType scan as a fallback when native matching is unavailable.

Enable system fonts by default for UIApplication and warm the font database in
the background. Allow applications to override the policy and disable the
automatic default in the unit-test runner.

Fix glyph fallback checks to respect the resolver's enabled state and add
coverage for concurrent warm-up and shaped symbol fallback.

Update efsw.
2026-08-23 16:59:23 -03:00
Martín Lucas Golini
89487fec8b Merge remote-tracking branch 'origin/develop' into develop 2026-08-22 20:32:20 -03:00
Martín Lucas Golini
7ffcccb9cb eterm: optimize terminal output processing
* Add fast paths for printable ASCII, row clearing, scrolling, history recycling, dirty tracking, and history width detection.
* Use runtime-dispatched AVX2 and NEON scanning for trailing blank cells, increase the PTY read buffer, and bound PTY processing and presentation to keep sustained output responsive.
* Preserve selection redraws, wide glyph cleanup, VT100 graphics handling, history reflow, and final buffered PTY output after process exit.
* Add regression coverage for deferred redraws, saturated reads, process termination, history scrolling, wide glyphs, and graphics character sets.
2026-08-22 20:28:45 -03:00
Martín Lucas Golini
e619fb4048 Publish sdk to nightly tag too. 2026-08-22 18:33:11 -03:00
Martín Lucas Golini
2ec0dcc877 Fix macOS CI build script. 2026-08-22 17:54:22 -03:00
Martín Lucas Golini
7f0633afb6 Auto publish eepp sdk builds in nightlys and tagged releases (not tested beyond Linux, let's see...). 2026-08-22 17:44:26 -03:00
Martín Lucas Golini
681841e11d Create unit-test windows hidden from the start while preserving hardware OpenGL rendering. Force double buffering for hidden X11 windows so framebuffer capture reads the rendered back buffer reliably, and keep SDL2/SDL3 behavior consistent. Update unit-test documentation to use direct desktop execution by default, with Xvfb retained for headless environments.
This change might break unit-tests in other platforms, next CI run will let us know.
2026-08-22 14:11:11 -03:00
Martín Lucas Golini
405e84608f Implemented the Image::diff() optimization.
- Added exact RGB equality and alpha-only fast paths.
  - Added optional createDiffImage, defaulting to true.
  - Updated screenshot comparisons to compare-only first and generate visual output only on failure.
  - Flattened iteration into a pointer-walking loop.
  - Added a 256-entry sRGB-to-linear lookup table.
  - Preserved CIEDE2000, thresholds, alpha comparison, maxDeltaE, and visual rendering semantics.
  - Added six focused correctness tests in src/tests/unit_tests/image_diff_tests.cpp.
2026-08-22 01:33:07 -03:00
Martín Lucas Golini
36e54fe2a3 Add reactive UI data binding and observable collections
Introduce observable and computed values, typed widget bindings, validation groups, UI properties, commands, and UI-thread delivery.

Add observable vector and list model support for incrementally updated collections, with filtering and source-row mapping.

Modernize the Flight Booker and CRUD examples and add focused data handling and collection examples demonstrating the new APIs.

Organize the UI binding headers under ui/databinding, expand test coverage for notification and lifetime semantics, and document API selection, validation, ownership, threading, and performance behavior.
2026-08-22 01:00:04 -03:00
Martín Lucas Golini
b4e8f0312c Fixed the ProjectDirectoryTree ignore regression... 2026-08-21 19:22:39 -03:00
Martín Lucas Golini
e5057afe28 Fix indexing files added in new directories
Scan newly added directory subtrees even after the initial project scan has finished, ensuring their files are added to ProjectDirectoryTree and become available to the universal locator.
Preserve initial-scan cancellation, respect hidden-file settings and accepted patterns, and avoid inserting duplicate files.
2026-08-21 17:03:47 -03:00
Martín Lucas Golini
866163457e Fixed the linear-layout sizing bug:
The child margins were already included. The real issue was that a wrap-content UILinearLayout allocated weighted space from the parent’s full dimensions, ignoring the parent’s content padding. Added a regression reproducing a padded parent, weighted input, and fixed siblings with margins.

Added removeKeyBindingCommand in UISceneNode and UIWindow.
2026-08-21 13:48:46 -03:00
Martín Lucas Golini
8eed5fcd58 Add configurable Tab Out support
Add an optional Tab Out behavior that moves a single cursor past configured trailing characters when pressing Tab. Expose the feature in Global Document Settings, keep it disabled by default, persist its configuration, and preserve existing selection and multi-cursor indentation behavior (SpartanJ/ecode#951).
2026-08-21 11:35:35 -03:00
Martín Lucas Golini
2895d771ab Fix builds and warnings in builds. 2026-08-21 10:51:20 -03:00
Martín Lucas Golini
864b2a9b3f Improve asynchronous filesystem event processing
- queue and batch filesystem model updates on the main thread
  - process directory-tree updates and worker-affine listeners asynchronously
  - coalesce adjacent modified events for the same path
  - preserve captured file metadata across delayed event delivery
  - add event, path, and thread-affinity filters for listener subscriptions
  - configure optimized per-plugin filesystem subscriptions
  - make listener removal wait for active callbacks safely
  - handle self-removal without deadlocking
  - support allocation-free matching of moved source paths
  - synchronize project directory-tree mutations with active searches
  - centralize diff-view button visibility around find/replace state
  - improve code editor wrap-content and scrollbar sizing
  - add queue, listener, and filesystem-model regression tests
2026-08-21 01:32:36 -03:00
Martín Lucas Golini
c13710dddc Fix status debugger panel serialization.
Fix UIWindow invalid min-size auto sizing.
Fix UIListView displaying horizontal scrollbar when wasn't necessary.
2026-08-20 17:12:25 -03:00
Martín Lucas Golini
f193047f1e Fix stack-overflow when auto-sizing dropdowns.
Fix combobox button click not closing the popup listbox when clicking the button with a visible popup listbox.
Fix some incorrect size policies in UIFileDialog.
2026-08-20 14:01:42 -03:00
Martín Lucas Golini
503cd890a5 Fix bug in UIDropDownList when using wrap_content in width size policy but layout_weight is being used too (wrap_content has no saying when layout_weight is unequal to 0). 2026-08-20 01:12:39 -03:00
Martín Lucas Golini
3a4d9cbad0 Merge branch 'develop' of github.com:SpartanJ/eepp into develop 2026-08-20 00:24:28 -03:00
Martín Lucas Golini
9c794fc12f Fix FileSystemModel crash on stale filesystem-model indexes
- dispatch filesystem events on the main thread in FileSystemListener, preserving model, tree, document, and callback ordering
- add address + generation node identity to close the allocator-reuse hole
- return null/empty results for stale indexes instead of root data
- assert the main-thread contract and token-guard queued listener actions
- add attached-view and stale-selection crash regression tests

Fixes crash reported in discussion SpartanJ/ecode#952
2026-08-20 00:24:16 -03:00
Martín Lucas Golini
85269b4927 Fix Windows MSVC debug build. 2026-08-19 16:08:30 -03:00
Martín Lucas Golini
8448d579ab A few optimizations to not affect first-frame time by the models catalog load, now everything runs async. 2026-08-19 10:58:43 -03:00
Martín Lucas Golini
0287e83642 Damn, missed the latests changes:
Fix ACP Agent mode message chunks enqueue ordering issue (ACP thought chunks were enqueued twice while answer chunks were enqueued once).
2026-08-19 01:31:51 -03:00
Martín Lucas Golini
b02fc1f3a6 Add dynamic AI model catalog and reasoning controls
Fetch and cache the models.dev catalog asynchronously, replacing bundled model lists when catalog data is available while preserving local and user-configured providers.

Update live AI Assistant instances after refresh, defer startup requests until the UI is ready, and cancel in-flight catalog requests during shutdown. Prioritize providers with configured credentials and infer each provider's cheapest title-generation model from catalog pricing.

Add model reasoning metadata, effort controls, request serialization, chat persistence, and localized UI labels. Refresh the bundled fallback models and support API keys for arbitrary catalog providers.

Fix ACP Agent mode message chunks enqueue ordering issue (ACP thought chunks were enqueued twice while answer chunks were enqueued once).

Fix UIDropDownList WrapContent sizing so dropdown width follows its text, skin, and padding, and tighten UIDropDown automatic height sizing.
2026-08-19 01:30:56 -03:00
Martín Lucas Golini
01ebd7a82d Fix recursive directory removal across platforms
Add FileSystem::dirRemoveAll() to normalize trailing separators and use the non-throwing std::filesystem::remove_all overload.

Migrate ecode and unit-test cleanup call sites to the centralized helper, preventing Haiku from crashing when removing directories with trailing slashes during shutdown.
2026-08-18 13:37:56 -03:00
Martín Lucas Golini
1b2927e129 Try fix the macOS CI issue.
getNodeFromPath() now translates paths under the configured root—such as /var/...—to the canonical root—such as /private/var/..  before calling realpath(). This keeps moved/deleted paths resolvable after the original leaf disappears.
2026-08-17 23:34:46 -03:00
Martín Lucas Golini
aebcc353c9 Merge branch 'develop' of github.com:SpartanJ/eepp into develop 2026-08-17 22:43:00 -03:00
Martín Lucas Golini
1534253e54 Add cross-directory filesystem move support
- enable efsw cross-directory move reporting in ecode
  - transfer FileSystemModel nodes between materialized parents
  - preserve selections, descendant paths, and lazy destination branches
  - update open document paths when parent directories move
  - fix persistent indexes across insert, delete, and move operations
  - clear stale tree-view metadata before model nodes are deleted
  - safely handle getRealPath() failures for stale paths
  - add model operation and filesystem move regression tests
  - update efsw and SOIL2 submodules
2026-08-17 22:42:52 -03:00
Martín Lucas Golini
12fda66eb7 Fix CoreText system font family and face resolution
Require the requested family when matching CoreText descriptors to prevent
substitutions such as Verdana resolving to Helvetica.

Validate the matched descriptor family and derive TTC face indices by matching
CoreText PostScript names against the font's FreeType faces instead of using
the descriptor array position.

Add macOS regression coverage for resolving and loading Verdana styles.
2026-08-16 01:30:18 -03:00
Martín Lucas Golini
ffabb19d60 Add configurable OpenType font features to text rendering:
Support explicit liga, calt, clig, and dlig shaping features and include
  text hints in layout caching, measurement, drawing, and character
  position calculations.

  Propagate scene-wide font feature defaults through UI text producers,
  with granular widget overrides and recursive cache invalidation. Update
  UICodeEditor and UIConsole to use shaped positioning when font features
  are enabled, including with monospaced fonts.

  Add separate UI and editor font feature settings to ecode, persist them
  as comma-separated OpenType tags, and apply changes immediately. Add
  localized menu labels, reusable Text feature conversion helpers, and
  regression coverage for shaping, positioning, propagation, and parsing.
2026-08-15 02:21:11 -03:00
Martín Lucas Golini
c1034fa87e Change command name from "monospace-font" to "editor-font". 2026-08-14 16:26:52 -03:00
Martín Lucas Golini
a4efdba1b0 Fix UIFontPickerDialog tests. 2026-08-14 14:38:41 -03:00
Martín Lucas Golini
cb035b82ab Merge remote-tracking branch 'origin/develop' into develop 2026-08-14 13:53:07 -03:00
Martín Lucas Golini
1b901eaa02 Fix external font handling in UIFontPickerDialog
Preserve explicitly selected font styles and correctly reconcile external fonts with the asynchronously loaded system font list.

Group same-family external fonts under the Style column when styles are visible, and expose them as distinct family entries when styles are hidden. Include filenames in localized external-font labels to distinguish alternate
font versions.

Ensure system-listed regular faces remain available after asynchronous loading and add regression coverage for collisions, selection, and hidden style behavior.
2026-08-14 13:52:55 -03:00
Martín Lucas Golini
cc87ed6924 Add CSS paint ordering and stacking contexts to HTML widgets
Implement spec-oriented paint phases for normal flow, floats, and
positioned descendants, including atomic stacking groups and applicable
z-index handling for flex and grid items.

Share cached ordering between drawing and hit testing, propagate
invalidation across stacking scopes, and preserve ancestor transforms
and clipping for promoted descendants.

Add regression coverage for paint order, hit testing, reparenting,
clipping, flex ordering, and the old Reddit layout. Document the
supported stacking model and remove the completed implementation plan.
2026-08-14 01:43:34 -03:00
Martín Lucas Golini
ce5c36c11d Fix Windows build. 2026-08-14 01:42:32 -03:00
Martín Lucas Golini
f8cef977d6 Fix include. 2026-08-14 00:34:57 -03:00
Martín Lucas Golini
bf750761ae ecode: add customizable debugger panel layouts
- add a reusable right-side panel managed at the application level
  - migrate debugger tabs to UITabWidgetSplitter instances
  - support moving and splitting debugger tabs across bottom and right panels
  - restrict debugger tab drops to debugger-owned panel targets
  - serialize debugger tab layouts, panel state, and table column widths
  - add pixel and percentage column-width modes to UIAbstractTableView
  - support XML/CSS configuration and an optional width-mode context menu
  - preserve percentage totals across resizing, fit-to-content, minimum widths,
    scrollbar changes, and pixel-density rounding
  - add splitter edge hiding while preserving splitter-always-show precedence
  - use EventConnection ownership for safe widget and controller lifetimes
  - validate serialized splitter layouts with structural limits
  - display project-relative source paths in debugger stack frames
  - add ecode localization strings, CSS documentation, tests, and agent rules
2026-08-14 00:17:29 -03:00
Martín Lucas Golini
a2c9adca9a Optimize allocations in project saving and editor rendering
Refactor IniFile storage to keep keys and values in unified SmallVector-backed
records, avoiding parallel vector growth and allocations for common small
configurations.

Use std::string_view by value throughout the IniFile input API to prevent
temporary std::string allocations for keys, value names, paths, and comments.
Write serialized components directly to streams instead of constructing a
temporary string for every line.

Return ProjectBuildConfiguration by const reference to avoid copying it during
project saves, and use inline storage for DocumentView visual lines to avoid
heap allocations while rendering the code editor minimap.

Add IniFile tests covering parsing, mutation, ordered serialization, and a
byte-for-byte ecode project-state round trip.
2026-08-13 16:03:04 -03:00
Martín Lucas Golini
74d9fa660c ecode: add multi-file Git status operations
Enable multiple selection in the Git status tree and apply stage, unstage, discard, open, and diff actions to all applicable files.
Open selected diffs in a single multi-file diff view, including portable handling for untracked files, and group mutating operations by repository.
Make the commit dialog resizable, allow its text editor to grow with the window, and wrap commit messages by word.
2026-08-12 00:03:25 -03:00
Martín Lucas Golini
953b0ecb03 Remember Project Tree View "Show Hidden Files" state between sessions. 2026-08-11 20:01:36 -03:00
Martín Lucas Golini
6ba7de31d5 Added "Open Folder" button to the take screenshot notification. 2026-08-11 17:51:31 -03:00
Martín Lucas Golini
6d00bba62d Nit in WebP image save. 2026-08-11 16:28:08 -03:00
Martín Lucas Golini
4789bfb5f9 ecode: add configurable screenshot support
Add an unlocked take-screenshot command and expose it under Settings -> Window with a default Print Screen binding.

Allow configuring the screenshot destination, filename pattern, and output format. Save screenshots under the ecode configuration directory by default, notify users after capture, and provide an action to open the result in the integrated image viewer.

Addresses a request in SpartanJ/ecode#950.
2026-08-11 15:43:22 -03:00
Martín Lucas Golini
a71e062dfb Fix font picker collision test on macOS: Use the bundled Noto Sans KR font for both the managed and copied external font fixtures. This guarantees matching family metadata without relying on platform-specific system font collections or face aliases. 2026-08-11 13:47:44 -03:00
Martín Lucas Golini
cd3df721a8 Try fix test in macOS 2026-08-11 13:20:46 -03:00
Martín Lucas Golini
6df0c0738f Add font size selection to ecode font picker:
Allow UIFontPickerDialog sections to be hidden and make ecode's UI, editor, and terminal font dialogs select both the font and its size.
Keep external fonts selectable across asynchronous font enumeration, including when they share a family name with a system font, and label them as external. Also normalize UILinearLayout weights across visible children so hidden picker columns release their space correctly.
Update font picker previews, size units, menu labels, translations, and lifetime handling.

Addresses SpartanJ/ecode#944.
2026-08-11 12:38:34 -03:00
Martín Lucas Golini
10a5d7effc ecode: Enable line-wrap by default on new installations.
Added Code of Conduct and Contributing documents.
Added templates for bug reports and feature requests.
2026-08-10 21:13:16 -03:00
Martín Lucas Golini
d31e880cc3 Fix bidirectional clipboard support in Emscripten builds:
SDL2 prevents the default action for Ctrl/Cmd key events on Emscripten,
which stops browsers from emitting the native paste event.

Intercept Ctrl/Cmd+V before SDL2 consumes it, allow the browser paste
event to update the internal clipboard, and replay the keydown so the
application executes its normal paste command.

Also refresh the clipboard through the asynchronous Clipboard API when
opening a context menu, enabling paste actions triggered without a
keyboard shortcut.

Export Emscripten's ccall runtime method so the browser clipboard helper
can reliably invoke its C++ callbacks in optimized builds, and disable
clang-format for the header containing embedded JavaScript.
2026-08-10 00:32:01 -03:00