bug: keep compose buffers open on validation failures #691

Closed
opened 2026-05-09 19:42:20 +00:00 by barrettruth · 0 comments
Owner

Prerequisites

Neovim version

current local development checkout

Operating system

Linux

Description

Compose validation currently closes the buffer and clears modified state when a create/edit buffer fails local validation. This loses the user context they need to fix the problem.

Validation also blocks unchanged template bodies, but forges generally allow template bodies as long as the title is valid. The local guard should only reject genuinely missing titles and issue template titles that were left as placeholders.

Steps to reproduce

  1. Open an issue or PR compose buffer.
  2. Leave the title empty, or leave a template-provided issue title such as bug: unchanged.
  3. Write the buffer.
  4. Observe that the buffer closes instead of staying open for correction.

Health check

not applicable; compose validation behavior

Forge CLI version

not applicable; validation happens before CLI submission

Minimal reproduction

vim.pack.add({
  "https://git.barrettruth.com/barrettruth/midnight.nvim",
  "https://github.com/tpope/vim-fugitive",
  "https://github.com/ibhagwan/fzf-lua",
  "https://git.barrettruth.com/barrettruth/forge.nvim",
})
vim.cmd.colorscheme("midnight")
## Prerequisites - [x] I have searched [existing issues](https://git.barrettruth.com/barrettruth/forge.nvim/issues) - [x] I have updated to the latest version ## Neovim version ```text current local development checkout ``` ## Operating system Linux ## Description Compose validation currently closes the buffer and clears modified state when a create/edit buffer fails local validation. This loses the user context they need to fix the problem. Validation also blocks unchanged template bodies, but forges generally allow template bodies as long as the title is valid. The local guard should only reject genuinely missing titles and issue template titles that were left as placeholders. ## Steps to reproduce 1. Open an issue or PR compose buffer. 2. Leave the title empty, or leave a template-provided issue title such as `bug: ` unchanged. 3. Write the buffer. 4. Observe that the buffer closes instead of staying open for correction. ## Health check ```text not applicable; compose validation behavior ``` ## Forge CLI version ```text not applicable; validation happens before CLI submission ``` ## Minimal reproduction ```lua vim.pack.add({ "https://git.barrettruth.com/barrettruth/midnight.nvim", "https://github.com/tpope/vim-fugitive", "https://github.com/ibhagwan/fzf-lua", "https://git.barrettruth.com/barrettruth/forge.nvim", }) vim.cmd.colorscheme("midnight") ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
barrettruth/forge.nvim#691
No description provided.