feat(tui): Compact Mode Phase 1 - Display Hierarchy Implementation #6556

Closed
opened 2026-02-16 18:04:35 -05:00 by yindo · 2 comments
Owner

Originally created by @apto-as on GitHub (Jan 16, 2026).

Originally assigned to: @thdxr on GitHub.

Summary

Implement Phase 1 of Compact Mode: 4-level display hierarchy for token efficiency and casual observer protection.

Background

Based on Trinitas Full Mode analysis (Hera, Athena, Artemis, Aurora, Muses), Compact Mode provides:

  • Primary benefit: 60-80% token reduction
  • Secondary benefit: Human-unreadable display (casual observer protection)

Phase 1 Scope (3 weeks)

Display Hierarchy Implementation

Level Display Target
FULL Verbatim content Recent 3 messages
COLLAPSED Preview + [42t] indicator Next 10 messages
SHORTHAND [U:auth?] [A:code:login] Next 30 messages
HIDDEN ··· 15 messages ··· Older messages

Deliverables

  • Display level calculation logic (DisplayMode.getLevel())
  • Shorthand notation generator (DisplayMode.toShorthand())
  • Collapsed preview generator (DisplayMode.toCollapsed())
  • Click-to-expand interaction
  • Keyboard toggle (Ctrl+K or configurable)
  • Mode indicator in TUI status bar
  • User preference persistence

Technical Notes

  • LLM Understanding Impact: None (Phase 1 is UI-only, API sends full text)
  • Vendor Agnostic: Works with all LLM providers
  • Performance: Minimal overhead, reactive rendering

Files to Modify

  • packages/opencode/src/session/ - Add display-mode.ts
  • packages/opencode/src/config/config.ts - Add displayMode config
  • packages/opencode/src/cli/cmd/tui/routes/session/ - UI components

Success Criteria

  • Toggle works correctly (on/off)
  • All 4 display levels render appropriately
  • Click-to-expand functions
  • Settings persist across sessions

Related

  • Phase 2: #TBD (Compression Engine)
  • Phase 3: #TBD (Intelligence Layer)

Generated by Trinitas Full Mode Analysis

Originally created by @apto-as on GitHub (Jan 16, 2026). Originally assigned to: @thdxr on GitHub. ## Summary Implement Phase 1 of Compact Mode: 4-level display hierarchy for token efficiency and casual observer protection. ## Background Based on Trinitas Full Mode analysis (Hera, Athena, Artemis, Aurora, Muses), Compact Mode provides: - **Primary benefit**: 60-80% token reduction - **Secondary benefit**: Human-unreadable display (casual observer protection) ## Phase 1 Scope (3 weeks) ### Display Hierarchy Implementation | Level | Display | Target | |-------|---------|--------| | FULL | Verbatim content | Recent 3 messages | | COLLAPSED | Preview + `[42t]` indicator | Next 10 messages | | SHORTHAND | `[U:auth?] [A:code:login]` | Next 30 messages | | HIDDEN | `··· 15 messages ···` | Older messages | ### Deliverables - [ ] Display level calculation logic (`DisplayMode.getLevel()`) - [ ] Shorthand notation generator (`DisplayMode.toShorthand()`) - [ ] Collapsed preview generator (`DisplayMode.toCollapsed()`) - [ ] Click-to-expand interaction - [ ] Keyboard toggle (`Ctrl+K` or configurable) - [ ] Mode indicator in TUI status bar - [ ] User preference persistence ### Technical Notes - **LLM Understanding Impact**: None (Phase 1 is UI-only, API sends full text) - **Vendor Agnostic**: ✅ Works with all LLM providers - **Performance**: Minimal overhead, reactive rendering ### Files to Modify - `packages/opencode/src/session/` - Add display-mode.ts - `packages/opencode/src/config/config.ts` - Add displayMode config - `packages/opencode/src/cli/cmd/tui/routes/session/` - UI components ## Success Criteria - [ ] Toggle works correctly (on/off) - [ ] All 4 display levels render appropriately - [ ] Click-to-expand functions - [ ] Settings persist across sessions ## Related - Phase 2: #TBD (Compression Engine) - Phase 3: #TBD (Intelligence Layer) --- *Generated by Trinitas Full Mode Analysis*
yindo added the opentui label 2026-02-16 18:04:35 -05:00
yindo closed this issue 2026-02-16 18:04:35 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 16, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #4786: [FEATURE]: focus mode to toggle off all the decorations
  • #6240: [FEATURE]: Add hints toggle to declutter UI
  • #4317: Feature: generic /compact command, auto-compaction, and fork-aware conversations

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 16, 2026): This issue might be a duplicate of existing issues. Please check: - #4786: [FEATURE]: focus mode to toggle off all the decorations - #6240: [FEATURE]: Add hints toggle to declutter UI - #4317: Feature: generic /compact command, auto-compaction, and fork-aware conversations Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Jan 16, 2026):

closing - spam

@rekram1-node commented on GitHub (Jan 16, 2026): closing - spam
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#6556