Skip to content

Open source AI coding agent. Designed for large projects and real world tasks.

Still show the '(r)eject file' hotkey in the `plandex changes` TUI when the current file isn't scrollable.

Dane Schneider618567e555fd
diff --git a/app/cli/changes_tui/main_viewport.go b/app/cli/changes_tui/main_viewport.go
index 77bc6580..fd85bc63 100644
--- a/app/cli/changes_tui/main_viewport.go
+++ b/app/cli/changes_tui/main_viewport.go
@@ -19,9 +19,7 @@ func (m changesUIModel) renderMainView() string {
fileViews := []string{fileView}
- if m.fileScrollable() {
- fileViews = append(fileViews, m.renderScrollFooter())
- }
+ fileViews = append(fileViews, m.renderScrollFooter())
fileContainer := lipgloss.JoinVertical(lipgloss.Left, fileViews...)
@@ -142,7 +140,12 @@ func (m changesUIModel) renderScrollFooter() string {
var footer string
if m.selectedNewFile() || m.selectedFullFile() {
- footer = ` (j/k) scroll • (d/u) page • (g/G) start/end • (r)eject file`
+ if m.fileScrollable() {
+ footer = ` (j/k) scroll • (d/u) page • (g/G) start/end • (r)eject file`
+ } else {
+ footer = ` (r)eject file`
+ }
+
} else {
footer = ` (j/k) scroll`
if m.oldScrollable() && m.newScrollable() {
diff --git a/app/cli/changes_tui/view.go b/app/cli/changes_tui/view.go
index 3acf923b..5f30f1dc 100644
--- a/app/cli/changes_tui/view.go
+++ b/app/cli/changes_tui/view.go
@@ -83,10 +83,8 @@ func (m *changesUIModel) updateViewportSizes() {
if m.selectedNewFile() || m.selectedFullFile() {
fileViewHeight := mainViewHeight
- if m.fileScrollable() {
- footerHeight := lipgloss.Height(m.renderScrollFooter())
- fileViewHeight -= footerHeight
- }
+ footerHeight := lipgloss.Height(m.renderScrollFooter())
+ fileViewHeight -= footerHeight
m.fileViewport.Width = mainViewWidth
m.fileViewport.Height = fileViewHeight
diff --git a/releases/cli/versions/0.9.1.md b/releases/cli/versions/0.9.1.md
index 37f3572f..a8823775 100644
--- a/releases/cli/versions/0.9.1.md
+++ b/releases/cli/versions/0.9.1.md
@@ -2,4 +2,5 @@
- If auto-upgrade fails due to a permissions issue, suggest re-running command with `sudo` (https://github.com/plandex-ai/plandex/issues/97 - thanks @kalil0321!)
- Include 'openrouter' in list of model providers when adding a custom model (https://github.com/plandex-ai/plandex/issues/107)
- Make prompts that shouldn't be optional required across the board (https://github.com/plandex-ai/plandex/issues/108)
-- Data that is piped into `plandex load` is now automatically given a name.
\ No newline at end of file
+- Data that is piped into `plandex load` is now automatically given a name.
+- Still show the '(r)eject file' hotkey in the `plandex changes` TUI when the current file isn't scrollable.
\ No newline at end of file