Skip to content

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

Closed

Description

@apto-as

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

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Jan 17, 2026
  2. github-actions commented on Jan 17, 2026

    @github-actions
    Contributor

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

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

  3. rekram1-node commented on Jan 17, 2026

    @rekram1-node
    Collaborator

    closing - spam

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

opentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions