Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: sudo-tee/opencode.nvim
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: sudo-tee/opencode.nvim
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: refactor/renderer-take2
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 7 commits
  • 22 files changed
  • 1 contributor

Commits on Mar 26, 2026

  1. refactor(renderer): add batched flush, append and scroll subsystems

    Introduce a renderer.flush scheduler to batch dirty/removed message
    sudo-tee committed Mar 26, 2026
    Configuration menu
    Copy the full SHA
    66e1e7a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    25b8ce3 View commit details
    Browse the repository at this point in the history
  3. fix: cursor scrolling

    sudo-tee committed Mar 26, 2026
    Configuration menu
    Copy the full SHA
    af6100b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b0a3e0e View commit details
    Browse the repository at this point in the history

Commits on Mar 27, 2026

  1. perf(renderer): suppress TextChanged during flushes, reduce deepcopy …

    …and extmark allocs
    
    - Wrap apply_pending and end_bulk_mode writes in eventignore='all' so
      render-markdown only fires from the explicit request_on_data_rendered
      call, not once per nvim_buf_set_lines during streaming or session load
    - set_lines noautocmd opts removed; bulk caller sets eventignore directly
      via begin_update/end_update, keeping the API clean
    - set_extmarks: skip deepcopy for marks with no start_col and no end_row
      offset needed (~99% of extmarks), eliminating 125k copies per session load
    - add_vertical_border: build extmark_opts once per call instead of per line
    - get_markdown_filetype: memoize vim.filetype.match results by filename
    - accumulate_bulk_extmarks helper deduplicates 3x copy-pasted extmark loop
    - Remove dead bulk_message_positions/bulk_part_positions tracking fields
    - Remove unused write_formatted_data export and dead append_part_now bulk branch
    - Hoist lines_equal/extmarks_equal out of format_message closure; replace
      vim.inspect comparison with vim.deep_equal
    sudo-tee committed Mar 27, 2026
    Configuration menu
    Copy the full SHA
    5510dc2 View commit details
    Browse the repository at this point in the history
  2. refactor(renderer): remove prev_line_count; extract scrolling logic a…

    …nd simplify flush
    
    Remove unused ctx.prev_line_count from the renderer context and reset.
    Simplify M.flush() to only request data-rendered when changes were applied and
    the renderer is not in bulk_mode. Extract window-scrolling into
    M.scroll_win_to_bottom() and reuse it from post_flush().
    
    tests: make replay deterministic and robust for bulk mode
    
    Sort extmarks deterministically in test helpers, clear/reset UI and renderer
    state during replay setup, and force synchronous completion (flush.end_bulk_mode())
    in replay tests when ctx.bulk_mode is active so assertions run against final output.
    sudo-tee committed Mar 27, 2026
    Configuration menu
    Copy the full SHA
    2b1eeda View commit details
    Browse the repository at this point in the history
  3. feat(ui): refactor renderer and scrolling

    - dialog: add support to extend vertical border to trailing blank via config.extend_border_to_trailing_blank
    - renderer: wrap full-session rendering in bulk flush (begin/end) and delegate scroll-to-bottom to scroll module
    - output_window: simplify visible-bottom-line calculation to use vim.fn.line('w$')
    - ui: guard treesitter language registration with pcall to avoid errors in minimal builds
    sudo-tee committed Mar 27, 2026
    Configuration menu
    Copy the full SHA
    dd6dba0 View commit details
    Browse the repository at this point in the history
Loading