Commit Graph

4653 Commits

Author SHA1 Message Date
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
Martín Lucas Golini
357f00c8ed perf: keep common text selections in inline storage
- migrate TextRanges to SmallVector with capacity for two selections
  - preserve vector, initializer-list, and single-range construction
  - add coverage for inline storage, copying, and heap fallback
  - export UIStyle::PropertyResolution for Windows shared builds
2026-08-09 22:09:29 -03:00
Martín Lucas Golini
23cf9084ce perf: reduce allocations across UI and editor hot paths
- reuse formatting, document text, property resolution, and layout storage
  - use inline containers for interpolations, callbacks, wrapping, and matcher state
  - optimize single-line insertion by mutating document lines without splitting
  - iterate PATH entries directly in Sys::which and reuse candidate buffers
  - avoid temporary clocks and string copies in frequent ecode plugin updates
  - retain documents during autocomplete cache jobs and prevent duplicate scheduling
  - fix PatternMatcher copy assignment and MSVC move-only container compilation
  - expand coverage for matching, text insertion, reusable strings, and Sys::which
2026-08-09 21:38:17 -03:00
Martín Lucas Golini
5f419ca58d Reduce allocations in CSS parsing and style updates
- reuse reentrant property-resolution storage during variable substitution
  - skip redundant resolution-slot copies using structural source comparison
  - retain variable cache capacity and resolve variables in place
  - avoid copying canonical names for definition-backed properties
  - propagate resolved inherited properties by reference through widget trees
  - parse animation and transition declarations with allocation-light string views
  - share declaration tokenization between animation and transition parsers
  - avoid empty animation-map and action-query allocations
  - parse border radii without temporary split vectors
  - accept string views when converting UI lengths
  - format color hex values directly without string streams
  - use inline storage for small polygon point collections
  - preserve animation parsing semantics and fix longhand direction handling
  - save eeiv configuration when closing through keyboard shortcuts
  - extend animation, variable-resolution, property-name, and color tests
2026-08-09 19:22:00 -03:00
Martín Lucas Golini
482833d95f * Fixed the crash in src/tools/ecode/globalsearchcontroller.cpp:603.
Probable reproduction:
  1. Open global search.
  2. Enter a search term.
  3. Start “replace in files” with Mod+R.
  4. Before the asynchronous search finishes, switch to document search.
  5. Immediately reopen normal global search.

The replace tree becomes active as soon as the search starts, but its model is only assigned when the asynchronous result arrives. Reopening normal global search tried to reuse that still-null model and called rowCount() on it. The loader is also closed during this transition, explaining the SceneNode::checkClose() trace from another timing of the same sequence.

The fix:
- Only transfers replace results when the replace model exists.
- Adds a defensive null check to updateGlobalSearchBarResults().
2026-08-09 01:02:46 -03:00
Martín Lucas Golini
b6cdc83818 ui: add typed value conversion errors
Replace boolean output-parameter converters with UIValueResult so conversion failures can provide numeric codes and optional diagnostics without exposing partially converted values.
Expose observable converter error state from UIDataBind, UIProperty, and UIValueBinding.
Reject invalid widget input without changing the model or propagating it to sibling widgets, while keeping programmatic model updates authoritative.
Migrate ecode's custom output parser converter, expand binding tests, and document the data-handling architecture and next form-validation
phase.
2026-08-09 00:52:00 -03:00
Martín Lucas Golini
01d5614a71 ui: add scoped event and observable value bindings
Introduce EventConnection and EventConnectionList for scoped Node event listeners that safely handle either emitter or observer destruction order.

Add ObservableValue and UIValueBinding for UI-independent observable state, along with a shared UIValueConverter policy used by both observable and raw data bindings.

Harden UIDataBind and UIProperty lifetime behavior, documentation, conversion, operators, and multi-widget handling. Preserve UIProperty as the lightweight option for UI-local owned values and UIDataBind for explicitly managed external values.

Use inline ordered callback storage to preserve registration-order dispatch without per-listener tree allocations.

Migrate submenu observation to scoped connections, safely clear ecode run configuration bindings before model erasure, and simplify the 7GUIs Counter example with UIProperty.

Add lifecycle, ordering, conversion, binding, and mutation regression tests.
2026-08-08 20:28:45 -03:00
Martín Lucas Golini
90c5d12c3e ecode: Ups restore the correct find and replace. 2026-08-08 00:52:13 -03:00
Martín Lucas Golini
a7002ed08c ecode: Fix several commands being executed in the editor that registered the commands and not the current editor! 2026-08-08 00:32:13 -03:00
Martín Lucas Golini
5c957121d9 Link unit-tests against pthread 2026-08-07 01:59:01 -03:00
Martín Lucas Golini
ea44f9f0f7 ecode: defer top-level settings menus to first show - Settings sub-menus were built eagerly on the startup critical path. Defer each top-level menu (Edit, Terminal, Tools, Window, Help, Document, View, Project) to its first OnMenuShow, following the existing lazy-submenu pattern: an empty placeholder is populated on first show and reloadStyle'd so it sizes correctly before positioning. Measured with Superluminal: settings-menu construction dropped from ~22.7ms to ~3.6ms, cutting launch time from 125ms to 107ms minimum (on my old AMD 3900X). 2026-08-07 00:05:06 -03:00