Skip to content

Conversation

@emamulandalib
Copy link

@emamulandalib emamulandalib commented Dec 12, 2025

Summary

Add System commands to toggle header, footer, and shortcuts visibility for small screen optimization. All preferences persist across restarts.

Commands Added (System category)

Command Description
Show/Hide header Toggle session title bar
Show/Hide footer Toggle directory/LSP/MCP status bar
Show/Hide shortcuts Toggle idle shortcut hints

All commands available globally (home + session pages) via command palette (ctrl+p).

Behavior

When Footer Hidden

  • Prompt info line shows: permissions indicator OR compact status (spinner + esc) OR shortcuts
  • Bottom section: empty
  • Maximizes vertical space for agent responses

When Footer Visible

  • Prompt info line: empty
  • Bottom section: detailed status with retry info
  • Footer: permissions, LSP, MCP status

Fixes #5277

@lcswillems
Copy link

@emamulandalib What about deciding based on size of screen? With commands, we ask the user to do the job of not showing things as soon as the size of the screen is too small. On a big screen, I'm fine with all this extra info (and I might want it!)

@emamulandalib emamulandalib changed the title feat(tui): add header/footer toggle and improve prompt info line feat(tui): add header/footer/shortcuts toggle and improve prompt info line Dec 12, 2025
@emamulandalib
Copy link
Author

emamulandalib commented Dec 12, 2025

@lcswillems I've added commands to toggle the header, footer, and shortcuts (though I'm unsure what the best term for 'shortcuts' is). I was also considering automatic hiding of these elements, but that would require further community discussion. Here are some screenshots

image image

With shortcuts enabled...
image

and disabled
image

@emamulandalib emamulandalib marked this pull request as draft December 12, 2025 12:12
@emamulandalib emamulandalib force-pushed the tui-small-screen branch 2 times, most recently from c6cdb6a to 805b634 Compare December 12, 2025 14:10
@emamulandalib emamulandalib marked this pull request as ready for review December 12, 2025 14:11
@lcswillems
Copy link

@emamulandalib It is great that you've worked on this! However, in my case, I don't really want to have to do the job of hiding / showing stuff each time I resize the window. The issue is stating that things should be hidden when the screen is small, so this PR doesn't really address the issue?

@emamulandalib
Copy link
Author

The issue is stating that things should be hidden when the screen is small, so this PR doesn't really address the issue?

@lcswillems, I am seeking community feedback regarding which UI elements should be hidden on smaller screens. Currently, only the sidebar logic is implemented to respond to screen size changes.

const sidebarVisible = createMemo(() => {
if (session()?.parentID) return false
if (sidebar() === "show") return true
if (sidebar() === "auto" && wide()) return true
return false
})

Should we also consider automatic hiding for small screens? For example:

  • Hide shortcuts automatically when height < X rows?
  • Hide header/footer automatically when height < Y rows?
  • Or keep it purely manual (current implementation)?
  • Or should we completely hide the headerfooter/shortcuts?

I think we should hide header/footer for the smaller screen.

@emamulandalib emamulandalib force-pushed the tui-small-screen branch 2 times, most recently from 1e9fdb9 to 772368f Compare December 12, 2025 16:02
@lcswillems
Copy link

Personally I'd say that anything non-mandatory to be displayed in order to continue chatting should be hidden when the screen is too small.

@emamulandalib
Copy link
Author

emamulandalib commented Dec 12, 2025

Thank you for the feedback. I was working on the implementation, but I encountered several questions. Maybe you can help me here.

Current Thresholds (Independent Checks)

Dimension Threshold Effect
Width > 120 cols Sidebar auto-shows (existing wide logic)
Height < 20 rows Header/footer/shortcuts auto-hide (new short logic which I've implemented locally)

Would we prefer:

  • Different thresholds? (e.g., height < 25 instead of < 20)
  • Combined check? (e.g., hide when height < 20 OR width < 60)
  • Progressive hiding? (e.g., hide footer at < 25, hide header at < 20, hide shortcuts at < 15)

Behavior Matrix

Screen Size Sidebar Header/Footer Shortcuts
150×30 (wide & tall) Visible Hidden (sidebar visible) Visible
150×15 (wide & short) Visible Hidden (both reasons) Hidden
80×30 (narrow & tall) Hidden Visible Visible
80×15 (narrow & short) Hidden Hidden (auto) Hidden (auto)

@emamulandalib emamulandalib force-pushed the tui-small-screen branch 4 times, most recently from 7cba854 to d334708 Compare December 12, 2025 20:27
…zation

Add System commands to toggle header, footer, and shortcuts visibility
via command palette (ctrl+p). All preferences persist across restarts.

- All toggle commands under System category in app.tsx
- Available globally (home + session pages)
- When footer hidden: compact status shown in prompt info line
- When footer visible: detailed status in bottom section

Fixes sst#5277
@lcswillems
Copy link

@emamulandalib I don't know (haven't checked the columns and so on). From your tests, what do you think would be the best numbers?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Very little place for agent answer on a small screen

2 participants