Skip to content

Commit e4fda21

Browse files
committed
chore: update session plan with test tasks
1 parent 64b83fe commit e4fda21

1 file changed

Lines changed: 15 additions & 4 deletions

File tree

SESSION_PLAN.md

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
11
## Session Plan
22

3-
Session Title: General self-improvement
3+
Session Title: Add missing unit tests for untested utility functions
44

5-
### Task 1: Self-assessment and improvement
6-
Files: cmd/iterate/, internal/evolution/
7-
Description: Read the source code, find one thing to improve (a bug, missing test, or UX gap), implement it, test it, and commit it.
5+
### Task 1: Add tests for selector formatting functions
6+
Files: internal/ui/selector/selector_formatting_test.go (new)
7+
Description: Add unit tests for formatTokenCount, formatContextWindow, formatCostUSD, and formatGitStatus in selector.go. These are pure functions with no tests currently. Test edge cases: zero values, large numbers, boundary percentages (0%, 75%, 90%+), USD formatting thresholds.
8+
Issue: none
9+
10+
### Task 2: Add tests for utility.go pure functions
11+
Files: internal/commands/utility_helpers_test.go (new)
12+
Description: Add unit tests for compactMessages, htmlEscape, highlightCodeBlocks, and formatTokenCount in internal/commands/utility.go. compactMessages has no dedicated tests; htmlEscape and highlightCodeBlocks are only used in the export HTML flow and have no tests. Test: HTML entity escaping, code block wrapping with/without language tags, unclosed code blocks, compaction with and without pins.
13+
Issue: none
14+
15+
### Task 3: Add tests for features.go utility functions
16+
Files: cmd/iterate/features_helpers_test.go (new)
17+
Description: Add unit tests for contextStats, compactHard, formatPinnedMessages, and initProject in cmd/iterate/features.go. These are pure functions with no tests. Test: context stats calculation with various message counts, compaction edge cases (keepLast > len, keepLast == 0), pinned message formatting with long content, initProject idempotency (skips existing files).
818
Issue: none
919

1020
### Issue Responses
21+
- none: Build/test/vet all pass. No actual TODOs/FIXMEs/panics in production code. Focus on adding tests for untested pure functions across three packages.

0 commit comments

Comments
 (0)