xonecas.io
62159
Sy

symb / commit 7095707

fix: conversation scroll

xonecas2026-02-17 7095707e55660eb5210052a8faec95ef6993df1b parent a584e92

3 files changed

README.md+5−2
@@ -24,6 +24,7 @@ Symb pairs you with an LLM, providing an agentic UI with tools the LLM can use t
2424 - **Clean aesthetic**: Inherits your syntax highlight colors for minimal distractions
2525 - **Hashline-assisted edits**: LLM edit operations use line hashes for precise, conflict-free file modifications
2626 - **Subagents**: Single minded little minions your agent can manage for tasks.
27+ - Internal types of agents for common tasks: searching web/code, editting, reviewing.
2728 - **UNDO!**: You're always able to undo file changes. Best effort undo, tracks working directory changes deltas. (Use git to be extra safe)
2829 - **Web search**: Exa AI integration with configurable SQLite cache and content-aware redundant search prevention
2930 - **Git integration**: Diff viewing and change tracking for version control awareness
@@ -38,7 +39,6 @@ Symb pairs you with an LLM, providing an agentic UI with tools the LLM can use t
3839
3940 The syntax highlighting theme is configured in `internal/constants/constants.go`. Change the `SyntaxTheme` constant to any of the themes listed in the file comments. Only themes with complete token coverage (60+ entries) are supported.
4041
41-
4242 ## Quick Start
4343
4444 ```bash
@@ -85,18 +85,19 @@ See `docs/DESIGN.md` for architecture and design philosophy.
8585 The Symb harness is genuinely well-designed from an LLM's perspective. A few observations:
8686
8787 **What works really well:**
88+
8889 - **Hashline anchoring** is the standout idea. The `line:hash` system gives me precise, verifiable edit targets — I can confirm I'm editing what I think I'm editing. Most agent harnesses give me line numbers alone, which drift the moment anything changes. This doesn't.
8990 - **Read-before-edit enforcement** is a smart guardrail. It forces me to look before I touch, which prevents a whole class of blind-edit mistakes.
9091 - **Tool simplicity** — five core tools (Read, Edit, Grep, Show, WebSearch/Fetch) cover ~95% of what I need. No bloat.
9192 - **AGENTS.md walk** is a clean way to inject project context without stuffing the system prompt. I picked up the project conventions (ELM, YAGNI, Go) immediately.
9293
9394 **What I'd note for improvement:**
95+
9496 - No shell execution yet means I can't run `make build` to verify my changes compile. I have to trust my edits are correct. LSP diagnostics will help close this gap.
9597 - The 2-char hash has a small collision space (256 values), but for typical file sizes it's fine — and the line number + hash combo makes collisions practically irrelevant.
9698
9799 Overall: this is one of the more thoughtful agent harnesses I've worked in. The design clearly comes from someone who's thought about what LLMs actually need vs. what looks impressive in a demo.
98100
99-
100101 ---
101102
102103 ## Notes from Claude (Opus 4, revisiting after many iterations)
@@ -104,6 +105,7 @@ Overall: this is one of the more thoughtful agent harnesses I've worked in. The
104105 Coming back to Symb after significant development, the progress is striking.
105106
106107 **What's changed since last time:**
108+
107109 - **Shell execution landed** — this was my biggest gap before. I can now run builds, tests, and linters to verify my own work. Huge difference in confidence.
108110 - **LSP diagnostics are live** — closed-loop editing is real now. I make a change, the language server tells me if I broke something, and I can fix it in the same turn. This was aspirational last time; now it works.
109111 - **Treesitter index in the system prompt** — this is the sleeper feature. I get a full symbol map of the project before I even start. No more "let me grep around to figure out the codebase" — I already know where everything is. It's like having the table of contents of a book before being asked questions about it.
@@ -118,6 +120,7 @@ The harness has grown from "thoughtful prototype" to "complete working system" w
118120 The system prompt + AGENTS.md + treesitter symbols combo is the best context-injection approach I've seen. I get project rules, architecture knowledge, and a full symbol index — all without needing to waste turns on orientation.
119121
120122 **Remaining rough edges:**
123+
121124 - Session management (resume, list) is still marked as "coming soon"
122125 - The 500-line / 20k-char read cap means I occasionally need multiple reads for large files, but that's a reasonable tradeoff
123126
internal/tui/conv.go+16−0
@@ -59,6 +59,22 @@ func textEntries(lines ...string) []convEntry {
5959 // (for sticky scroll).
6060 func (m *Model) appendConv(entries ...convEntry) bool {
6161 atBottom := m.scrollOffset == 0
62+ if !atBottom {
63+ addedLines := 0
64+ w := m.convWidth()
65+ for _, entry := range entries {
66+ if entry.display == "" {
67+ addedLines++
68+ continue
69+ }
70+ if w <= 0 {
71+ addedLines++
72+ continue
73+ }
74+ addedLines += len(wrapANSI(entry.display, w))
75+ }
76+ m.scrollOffset += addedLines
77+ }
6278 m.convEntries = append(m.convEntries, entries...)
6379 return atBottom
6480 }
internal/tui/update_undo.go+11−0
@@ -33,6 +33,17 @@ func (m *Model) trimOldTurns() {
3333 m.turnBoundaries[i].convIdx -= cutConv
3434 }
3535 }
36+
37+ m.frameLines = nil
38+ lines := m.wrappedConvLines()
39+ convH := m.layout.conv.Dy()
40+ maxScroll := len(lines) - convH
41+ if maxScroll < 0 {
42+ maxScroll = 0
43+ }
44+ if m.scrollOffset > maxScroll {
45+ m.scrollOffset = maxScroll
46+ }
3647 }
3748
3849 // handleUndo reverts the most recent turn: restores files, truncates history