NS5 slice: Add rename and code actions #32
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
OBJECTIVE: Implement LSP rename and code actions with explicit preview/confirmation suitable for mobile use.
AUTHORITY: Parent #5
NS5: Syntax and LSP coding intelligence; PRODUCT.md; REQUIREMENTS.md (PRODUCT.md; req: coding/002-003; req: ui/002; req: governance/002).AGENT AUTHORITY:
PARENT: #5 via explicit issue link and parent checklist.
SCOPE: The smallest source/docs/tests needed to make this behavior real and verified.
BOUNDARIES: No autonomous broad edits without explicit user command.
ACCEPTANCE: Fake LSP edit/action applies expected buffer changes and failure cases remain recoverable.
VERIFICATION: Run the cheapest command that proves acceptance. Include regular tests for the intended payoff and adversarial tests for realistic failure, boundary, or regression cases. If no implementation test command exists yet, create/record the canonical command in AGENTS.md as part of the slice.
BLOCKERS: none
GOAL: Implement this vertical slice to the ACCEPTANCE above, keep the repo clean, cite relevant
req:anchors in code/tests where applicable, and close only after verification passes.Implemented in commit
970d1bb4ec(Add explicit LSP edit previews).Verification:
Regular tests: rename workspace edits and code-action edits parse into explicit
lsp:edit:*preview rows with range, URI preview, label, and encoded replacement text. TUIlsp_renameandlsp_code_actionsrender shared preview panels, and onlylsp_edit_apply_selectedmutates the current buffer at the selected range.Adversarial tests: invalid edit kinds/payloads, command-only actions, non-edit rows, impossible ranges, and failed preview/apply commands are rejected without corrupting the current buffer.
Boundary: explicit current-buffer edit previews and selected-row application only. No autonomous edit application, cross-file mutation, command execution code actions, refactor orchestration, undo stack UI, or background LSP manager added.