Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .claude/commands/make-release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Create a release from the develop branch. Follow these steps exactly:

## Pre-flight checks
1. Ensure you are on the `develop` branch
2. Run `cargo fmt && cargo clippy -- -D warnings && cargo build`
3. Run `cargo test --no-fail-fast` and report the total passing test count
4. Confirm there are no uncommitted changes (`git status`)

## Version bump
1. Read current version from `Cargo.toml`
2. Ask the user whether this is a **minor** (new features) or **patch** (bug fixes only) release
3. Bump the version in `Cargo.toml` accordingly
4. Commit with message: `chore: bump version to X.Y.Z for release`
5. Push to `origin develop`

## Flatpak sources
1. Check if `Cargo.lock` changed vs `main`: `git diff main -- Cargo.lock | head -5`
2. If changed, warn the user: "Cargo.lock changed since last release. The Flatpak CI build may fail if `flatpak/cargo-sources.json` is stale. You may need to regenerate it with `python3 flatpak-cargo-generator.py Cargo.lock -o flatpak/cargo-sources.json` from the flatpak-builder-tools repo."

## Create PR
1. Run `git log main..develop --oneline` to see all commits going into the release
2. Create a PR from `develop` to `main` using `gh pr create` with:
- Title: `Release vX.Y.Z`
- Body: Summary of changes (grouped by category), test plan with cargo check results
3. Print the PR URL

## After PR
Tell the user:
- Merging the PR to `main` triggers `release.yml` which creates a GitHub Release tagged `vX.Y.Z`
- Never push directly to `main` — always merge from `develop` via PR
- Monitor CI on the PR for any failures before merging
21 changes: 13 additions & 8 deletions BUGS.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
# Known Bugs

- **(Low) GTK Explorer: Enter requires two presses after arrow-key navigation** — After using arrow keys to navigate to a folder in the GTK TreeView, the first Enter press doesn't expand/collapse; the second does. Likely a GTK4 TreeView cursor/selection sync issue or interaction between GTK's built-in key bindings and the `row_activated` signal. Works correctly after the first activation. TUI explorer is unaffected.
- **(Intermittent) TUI rendering artifacts** — Stale characters from a previous view sometimes linger on screen. Mitigated in Session 244: `terminal.clear()` on resize events and on popup dismiss (picker/folder picker transition to hidden). Root cause: ratatui's incremental diff can miss cells when the physical terminal state diverges from its buffer tracking. Workaround for any remaining cases: Ctrl+L forces a full screen redraw.

- **(Intermittent) TUI rendering artifacts** — Stale characters from a previous view sometimes linger on screen. Not reliably reproducible yet. Workaround: Ctrl+L forces a full screen redraw.
- **GTK terminal panel toggle requires two clicks** — The `[P]` layout toggle button in the GTK status bar requires two clicks to show the terminal panel on the first use. Subsequent toggles work with a single click. Likely a timing issue between the `EngineAction::OpenTerminal` dispatch and the GTK layout recomputation.

- **(Low) Hardcoded colors in rendering code — 59 instances across 5 files.** These colors don't adapt to the user's chosen theme. Should all use `Theme` struct fields instead. Breakdown:
- `src/gtk/css.rs` (23) — Button, dialog, toggle, and find bar CSS colors are hardcoded hex. Should be interpolated from the theme via `make_theme_css()`.
- `src/gtk/draw.rs` (12) — Scrollbar track/thumb RGBA, tooltip popup bg/fg, terminal pane background, extension section headers. Should use theme fields.
- `src/tui_main/panels.rs` (15) — Git status colors (`RColor::Rgb(90,180,90)` etc.) ignore existing `theme.git_added/modified/deleted`; activity bar icon colors, scrollbar thumb, terminal background/find match colors all hardcoded.
- `src/tui_main/render_impl.rs` (3) — Scrollbar thumb color `RColor::Rgb(128,128,128)` repeated 3 times. Should be a theme field (e.g. `theme.scrollbar_thumb`).
- `src/gtk/mod.rs` (3) — Cursor indicator box RGBA, search result markup hex colors.

## Resolved

- **TUI spell underlines bleed into fuzzy finder** — `set_cell()` and `set_cell_wide()` only reset character/fg/bg but not `cell.modifier` or `cell.underline_color`, so `Modifier::UNDERLINED` from spell rendering survived into the picker overlay. Fixed by resetting both fields in `set_cell()`, `set_cell_wide()`, and `set_cell_styled()` (which left stale `underline_color` when passed `None`).

- **Marksman LSP status indicator stuck on "initializing"** — `mark_server_responded()` was only called on non-empty hover/definition responses, so servers like `marksman` that don't support semantic tokens (and may return empty hover content for many positions) stayed stuck at "Initializing". Fixed by marking the server as responsive on `Initialized` event (handshake completion is sufficient proof of readiness), and removing the empty-result guards on hover/definition responses.

- **Spell check underline misaligned** — GTK backend called `layout.set_attributes(None)` before computing underline/cursor positions via `index_to_pos`, stripping `font_scale` attributes (1.1–1.4× on markdown headings). Positions were calculated at normal font width while text was rendered scaled, causing underlines to start before the word and end in the middle. Fixed by preserving Pango attributes (`build_pango_attrs(&rl.spans)`) for diagnostics, spell underlines, cursor, ghost text, and extra cursors. Also fixed spell checker not initializing when enabled via Settings sidebar or settings.json reload.
- **Inline rename cursor position tests failing on macOS CI** — `test_inline_rename_start` and `test_inline_rename_typing_and_cursor` expected cursor at full filename length, but `start_explorer_rename()` positions cursor at stem end (before extension). Tests updated to match.
- **Hardcoded colors in rendering code** — Added 4 new Theme fields (`scrollbar_thumb`, `scrollbar_track`, `terminal_bg`, `activity_bar_fg`) with values for all 6 built-in themes + VSCode JSON importer. Replaced hardcoded `RColor::Rgb(128,128,128)` scrollbar thumbs (3 in render_impl.rs, 4 in panels.rs), `RColor::Rgb(90/220,...)` git status colors → `theme.git_added/modified/deleted`, `RColor::Rgb(100,100,110)` activity bar icons → `theme.activity_bar_fg`, `rgb(30,30,30)` terminal bg → `theme.terminal_bg` (GTK + TUI), debug button colors → `theme.git_added`/`theme.diagnostic_error`, terminal find-match colors → `theme.search_match_*`, search result markup → `theme.function`/`theme.foreground`, cursor indicator → `theme.scrollbar_thumb`, tab drag overlay → `theme.cursor`/`theme.background`/`theme.foreground`, ext panel secondary bg → `theme.status_bg.darken(0.15)`. GTK CSS: scrollbar slider, h-editor-scrollbar, find dialog, find-match-count colors now theme-aware via `make_theme_css()` overrides. Remaining STATIC_CSS hex values are either close-button platform convention or dead fallbacks already overridden by `make_theme_css()`.
- **TUI: Settings button in activity bar not clickable** — The status bar click handler (`row + 2 == term_height`) and command line guard (`row + 1 >= term_height`) in `mouse.rs` intercepted ALL clicks on the bottom two terminal rows regardless of column, before the activity bar handler could process them. The settings button is rendered at the bottom of the activity bar, which coincides with the command line row. Fixed by adding `col >= ab_width` guards so those checks only apply to clicks outside the activity bar column.
- **GTK Explorer: first click/Enter on folder required two presses** — `tree_row_expanded()` removed the dummy placeholder child before populating real children, leaving the directory with zero children momentarily. GTK auto-collapsed the row when its last child was removed. Fixed by populating real children first, then removing the dummy. Also fixed Enter after arrow-key navigation to use `ExplorerActivateSelected` (syncs cursor→selection) instead of native `row_activated`.
- **GTK: Inline rename in explorer disappears immediately** — Root cause: periodic `update_tree_indicators` (every 1s) called `set_value` on TreeStore rows, cancelling the active GTK cell editor. Also `RefreshFileTree` could clear the store during editing. Fixed by skipping indicator updates and tree refreshes while `name_cell.is_editing()` is true. Also fixed related SIGSEGV from `__NEW_FILE__`/`__NEW_FOLDER__` marker rows in the indicator walk, context menu popover stealing focus (explicit `popdown()` + 50ms delay), and GTK rename pre-selecting entire filename instead of stem only (`connect_editing_started` + `Entry::select_region()`).
- **LineEnding::detect() crash on multi-byte chars** — `&text[..8192]` panicked when byte 8192 landed inside a multi-byte character (e.g. `─` at bytes 8190..8193). Fixed by backing up to nearest char boundary via `is_char_boundary()` loop.
- **VSCode mode undo granularity** — Every character typed created its own undo entry. Fixed by keeping the undo group open across consecutive character insertions in `handle_vscode_key()`, breaking only on non-character actions (cursor movement, Backspace, Return, Ctrl+* commands) or external cursor moves (mouse clicks). `vscode_undo_group_open` + `vscode_undo_cursor` fields on Engine. 5 new tests.
- **Search `/` results land at viewport bottom** — `jump_to_search_match()` called `ensure_cursor_visible()` which with `scrolloff=0` placed the match at the absolute bottom edge. Fixed by centering the match when it lands in the bottom quarter of the viewport.
- **Tab bar hides tabs when there's room** — `tab_visible_count` feedback loop: TUI renderer returned tab **count** but `set_tab_visible_count()` stored it as `tab_bar_width` (column width). With 5 tabs visible, engine thought it had 5 columns of space, causing a death spiral where each frame hid more tabs. Fixed by returning actual available width in columns (`tab_end_for_content - area.x`), matching the GTK backend. Also fixed `tab_display_width()` off-by-one (+3→+2 for close+separator).
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "vimcode"
version = "0.7.0"
version = "0.8.0"
edition = "2021"
description = "Vim-like code editor with GTK4 and tree-sitter"
license = "MIT"
Expand Down
Loading
Loading