Commit Graph
4163 Commits
Author SHA1 Message Date
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 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
Martín Lucas Golini 6ff677ff2b Rename macosmenubar.m to .mm to avoid getting compiled as Objective-C and not Objective-C++. 2026-08-24 10:15:28 -03:00
Martín Lucas Golini 9752be89ad Add native macOS global menu bar integration
Mirror UIMenuBar hierarchies into AppKit while keeping eepp menus as the
source of truth.

Add semantic item activation and menu lifecycle hooks so native actions,
lazy menus, checkboxes, radio buttons, visibility, enabled state, and
submenus preserve existing eepp behavior. Support shortcuts and standard
About, Preferences, Quit, Window, Help, and Services menu integration.

Keep the platform adapter private to the UI implementation and support
safe installation, synchronization, and removal of the native menu.

Migrate ecode away from its hand-written Cocoa menu, assign semantic menu
roles, and populate the UI Language submenu synchronously so it is ready
on its first opening.

Add unit tests covering activation, menu lifecycle, roles, and submenu
preparation.

Refs: SpartanJ/ecode#823
2026-08-24 02:38:36 -03:00
Martín Lucas Golini 288aa931fe ecode: add centralized settings panel
Introduce modal user and project settings panels with searchable tree navigation and live configuration updates.

  - centralize settings registration and presentation
  - add user and project settings commands and shortcuts
  - preserve operational actions in the existing settings menu
  - support boolean, choice, numeric, and action-based settings
  - restore renderer notifications and choice descriptions
  - persist settings when closing the panel
  - add translated settings strings for all supported locales
  - fix live color preview updates
2026-08-24 02:34:14 -03:00
Martín Lucas Golini 6b27ea2dc8 Fix: UISceneNode::reevaluateFontStyle() now preserves an existing FontTrueType family when it already owns the requested bold, italic, or bold-italic variant. 2026-08-23 18:53:45 -03:00
Martín Lucas Golini 65a389aa96 Fix two list-marker issues:
- Decimal/text markers now inherit the current list-item font color.
  - Marker X/Y coordinates are pixel-snapped, eliminating blurry rendering.
  - The behavior is shared by <li> and textual <summary> markers.
  - Added focused tests for inherited color and integer positioning.
2026-08-23 18:50:45 -03:00
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 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 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