Commit Graph

29 Commits

Author SHA1 Message Date
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
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
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
0e9f2e832f Optimize eterm Kitty graphics frame replacement
- swap decoded frames into reusable image storage
  - recycle previous frame allocations for subsequent transfers
  - avoid full-frame copies during anonymous image replacement
  - extend tests to verify safe allocation reuse across frames
  - document eterm and eeiv in the project introduction
2026-09-04 18:45:10 -03:00
Martín Lucas Golini
36200430aa Fix conflict discard and merge view copy commands
- add Discard actions for conflicted files and conflict groups
  - restore discarded conflicts from HEAD in both index and working tree
  - restrict regular discard actions to changed tracked files
  - preserve default editor commands when replacing an editor document
  - enable copying from the read-only merge-view side panels
  - cover conflict restoration and merge-side copying
  - document build parallelism and function-spacing conventions
2026-08-31 11:03:19 -03:00
Martín Lucas Golini
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
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
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
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
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
48b7e7c21f ui: improve HTML inline layout and old Reddit rendering
- implement per-side CSS border styles and patterned rendering
  - preserve rectangular rasterization for thin dotted borders
  - separate CSS and native-widget border defaults
  - correct inline atomic-box and vertical-align baseline layout
  - collapse adjacent block margins in rich-text flow
  - preserve forced line breaks and formatting margins
  - size HTML text inputs from font ascent and descent
  - expose replaced-control text baselines to inline layout
  - enforce single-owner painting for inline backgrounds and borders
  - enable and update the old Reddit visual regression golden
  - add generic layout, border, and form-control regression tests
  - document spec-first HTML work and project build conventions
2026-08-02 17:48:53 -03:00
Martín Lucas Golini
eb7398f9ec Fix HTML loading stalls on large modern pages
- batch asynchronous HTTP stylesheets and apply them in a single reload
  - skip unsupported block at-rules without leaking nested rules
  - prevent scripts nested in unknown custom elements from entering the render tree
  - add regression coverage for unsupported at-rules and nested scripts
  - document the Ninja release workflow for performance testing
2026-08-02 00:55:03 -03:00
Martín Lucas Golini
90f41a64aa Fix HTML viewport sizing and background shorthand parsing
- parse slash-separated background position and size without requiring whitespace
  - recognize custom-property background images following an explicit size
  - resolve root body and html minimum heights against the layout viewport
  - avoid expanding semantic document boxes to the scrollable content extent
  - handle auto margins and percentage offsets correctly for absolute positioning
  - add DuckDuckGo layout and background shorthand regression tests
  - document the Xvfb limitation with multisampled OpenGL contexts
2026-07-27 00:59:39 -03:00
Martín Lucas Golini
e5751da1a0 Refactor UIWebView document scene isolation and async resource lifetime.
Move UIWebView documents into isolated UISceneNode instances, keep document viewport and extent metrics synchronized, and fix shrink/grow behavior after navigation, async CSS, and viewport changes. Scope author styles and font-face resources per document scene, ignore stale async callbacks after navigation or destruction, and add deterministic coverage for CSS, fonts, images, cookies, hit testing, and document extent updates.

Fixes in UIWebView -> doc -> html -> body resizing issues. Added a few tests to catch regressions.
2026-07-03 01:33:47 -03:00
Martín Lucas Golini
38448008ec Merge branch 'develop' into feature/uiwebview 2026-07-01 19:10:22 -03:00
Martín Lucas Golini
f6da5ef76e Fix warning on macOS due to posix_spawn_file_actions_addchdir_np usage (we must use posix_spawn_file_actions_addchdir).
Try to run tests with borderless windows to see if macOS windows are created with the right size.
2026-06-30 11:35:33 -03:00
Martín Lucas Golini
5cba387497 UIWebView with its own UISceneNode support WIP. 2026-06-09 01:30:14 -03:00
Martín Lucas Golini
d8fa49be37 Fix xvfb-run-eepp, update unit-tests.md. 2026-06-07 22:12:28 -03:00
Martín Lucas Golini
f0c631fa8a Add grid layout and white space collapse support plans. 2026-05-31 13:53:20 -03:00
Martín Lucas Golini
c2b1a91d90 Added the pending flex support tests.
Added xvfb-run-eepp with better defaults than xvfb-run, updated documentation.
2026-05-31 13:14:30 -03:00
Martín Lucas Golini
b36ef2cf85 Fix background draw in atomic boxes.
Fix in selector parser.
2026-05-25 01:49:04 -03:00
Martín Lucas Golini
afe3df0650 Improve baseline aligment in inline-blocks.
Improved html architecture documentation.
2026-05-17 03:19:08 -03:00
Martín Lucas Golini
792bae6da2 Make UITextNode easily debuggable by setting its position and size. 2026-05-09 20:05:35 -03:00
Martín Lucas Golini
ecf7c20262 Fix foreground-radius definition. 2026-05-03 00:48:13 -03:00
Martín Lucas Golini
41e979d314 CSS Position (Out of Flow) implementation.
Added a few plan descriptions that I want to implement later.
2026-04-26 21:50:34 -03:00
Martín Lucas Golini
dea87f345e Disable ASAN leak detection when run unit-tests with xvfb-run (because the tool leaks all X11 windows). 2026-04-24 12:00:45 -03:00
Martín Lucas Golini
d45ffbfe23 Add basic HTML tables support, this allows us to display tables in Markdown files. 2026-03-08 21:51:30 -03:00
Martín Lucas Golini
9514b0fd73 Several general improvements and fixes across the UI: UIRichText, UITextSpan, UIImage, UIScrollView. 2026-03-08 03:05:17 -03:00
Martín Lucas Golini
e0bf0a23e5 Added a basic RichText class (and added tests and an example).
Fixed LineWrap when using initial X offset and the word does not fit in the current line but it fits in the next.
Added basic agent rules.
2026-02-08 13:35:16 -03:00