Skip to content

Commit 6ff4c41

Browse files
committed
test(replay): fix agent instructions and dump
1 parent 222d232 commit 6ff4c41

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

AGENTS.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# AGENTS.md
22

33
## Build, Lint, and Test
4+
45
- **Run all tests:** `./run_tests.sh`
56
- **Minimal tests:**
67
`nvim --headless -u tests/minimal/init.lua -c "lua require('plenary.test_harness').test_directory('./tests/minimal', {minimal_init = './tests/minimal/init.lua', sequential = true})"`
@@ -9,12 +10,13 @@
910
- **Run a single test:** Replace the directory in the above command with the test file path, e.g.:
1011
`nvim --headless -u tests/manual/init.lua -c "lua require('plenary.test_harness').test_directory('./tests/unit/job_spec.lua', {minimal_init = './tests/minimal/init.lua'})"`
1112
- **Manual/Visual tests:** `./tests/manual/run_replay.sh` - Replay captured event data for visual testing
12-
- **Debug rendering in headless mode:**
13-
`nvim --headless -u tests/manual/init_replay.lua "+ReplayHeadless" "+ReplayLoad tests/data/FILE.json" "+ReplayAll 10"`
13+
- **Debug rendering in headless mode:**
14+
`nvim --headless -u tests/manual/init_replay.lua "+ReplayHeadless" "+ReplayLoad tests/data/FILE.json" "+ReplayAll 1" "+sleep 500m | qa!"`
1415
This will replay events and dump the output buffer to stdout, useful for debugging rendering issues without a UI.
1516
- **Lint:** No explicit lint command; follow Lua best practices.
1617

1718
## Code Style Guidelines
19+
1820
- **Imports:** `local mod = require('mod')` at the top. Group standard, then project imports.
1921
- **Formatting:** 2 spaces per indent. No trailing whitespace. Lines ≤ 100 chars.
2022
- **Types:** Use Lua annotations (`---@class`, `---@field`, etc.) for public APIs/config.
@@ -26,4 +28,3 @@
2628
- **Tests:** Place in `tests/minimal/` or `tests/unit/`. Manual/visual tests in `tests/manual/`.
2729

2830
_Agentic coding agents must follow these conventions strictly for consistency and reliability._
29-

tests/manual/renderer_replay.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ function M.dump_buffer_and_quit()
248248
end
249249

250250
local lines = vim.api.nvim_buf_get_lines(buf, 0, -1, false)
251-
local extmarks = vim.api.nvim_buf_get_extmarks(buf, renderer._namespace, 0, -1, { details = true })
251+
local extmarks = vim.api.nvim_buf_get_extmarks(buf, output_window.namespace, 0, -1, { details = true })
252252

253253
local extmarks_by_line = {}
254254
for _, mark in ipairs(extmarks) do

0 commit comments

Comments
 (0)