Skip to content

feat: Add sort direction modal for improved UX#26

Merged
wiiiimm merged 2 commits into
mainfrom
feature/sort-direction-modal
Sep 5, 2025
Merged

feat: Add sort direction modal for improved UX#26
wiiiimm merged 2 commits into
mainfrom
feature/sort-direction-modal

Conversation

@wiiiimm
Copy link
Copy Markdown
Owner

@wiiiimm wiiiimm commented Sep 5, 2025

Summary

This PR improves the user experience by replacing the direct sort direction toggle with an interactive modal, providing better visual feedback and consistency with the existing sort key modal.

Changes

  • ✨ Created new SortDirectionModal component with visual feedback
  • 🎨 Shows current sorting key context and describes what each direction means
  • 🔄 Replaces direct toggle (D key) with modal-based interaction
  • ⌨️ Provides keyboard shortcuts (A/D) and arrow key navigation
  • 📝 Updated README to reflect the new modal-based interaction

Before

  • Pressing 'D' would immediately toggle between ascending/descending without feedback
  • Users had no visual indication of what the sort direction meant for each sort key

After

  • Pressing 'D' opens a modal showing:
    • Current sort key (e.g., "Sorting by: Last Updated")
    • Clear options with descriptions:
      • Descending ↓ (e.g., "Most recently updated first")
      • Ascending ↑ (e.g., "Oldest updated first")
    • Visual indicator for current selection (✓)
    • Keyboard shortcuts for quick selection

Screenshots

The modal provides context-aware descriptions based on the current sort key:

  • Last Updated: "Most recently updated first" / "Oldest updated first"
  • Last Pushed: "Most recently pushed first" / "Oldest pushed first"
  • Name: "Z to A" / "A to Z"
  • Stars: "Most stars first" / "Fewest stars first"

Testing

  • Build successful
  • Modal opens with 'D' key
  • Arrow keys navigate options
  • Enter selects option
  • Escape/C cancels
  • Quick shortcuts (A/D) work
  • Visual feedback for current selection
  • Consistent with existing modal patterns

Related

This follows the same UX pattern as the sort key modal (S key), providing a consistent and intuitive interface throughout the application.

Summary by CodeRabbit

  • New Features

    • Introduced a Sort Direction modal to choose Ascending/Descending instead of an instant toggle. Press D to open, use Arrow keys/Tab to navigate, Enter to confirm, A/D for quick select, Esc/Cancel to close. Visual cues mark current and focused options; other inputs are paused while the modal is open and header reflects active modals.
  • Documentation

    • README updated to describe modal-based sort direction selection and revised D key behaviour.

- Created new SortDirectionModal component with visual feedback
- Shows current sorting key and describes what each direction means
- Replaces direct toggle with 'D' key to open modal
- Provides keyboard shortcuts (A/D) and arrow key navigation
- Updates README to reflect the new modal-based interaction
- Consistent with existing sort modal pattern for better user experience
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Sep 5, 2025

Walkthrough

Introduces a new SortDirectionModal component and integrates it into RepoList to handle sort direction selection via a modal instead of a toggle. Updates README to reflect the modal-based interaction and adds a re-export in the modals index. Keyboard handling updated to open and manage the modal and persist selection.

Changes

Cohort / File(s) Summary
Documentation
README.md
Updated Interactive Sorting docs: pressing D now opens a sort direction modal; no toggle behaviour.
Modals
src/ui/components/modals/SortDirectionModal.tsx, src/ui/components/modals/index.ts
Added SortDirectionModal (Ink-based) with keyboard navigation (Up/Down/Tab/A/D/Enter/Esc), callbacks for selection/cancel, dynamic labels/descriptions and color cues; exports new SortDirection type and default export; re-exported from modals index.
Repo List Integration
src/ui/views/RepoList.tsx
Wired SortDirectionModal into view: added sortDirectionMode state, input trapping while modal open, replaced D-key toggle with modal open, applied onSelect/onCancel handlers, persisted selection via storeUIPrefs, and integrated modal rendering branch.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant RepoList
  participant SortDirectionModal as SortDirectionModal
  participant UIPrefs as UI Prefs Store

  User->>RepoList: Press "D"
  RepoList->>RepoList: Set sortDirectionMode = true
  RepoList->>SortDirectionModal: Render with currentDirection, currentSortKey

  User->>SortDirectionModal: Navigate (Up/Down/Tab/A/D)
  User->>SortDirectionModal: Enter (confirm) / Esc (cancel)

  alt Confirm direction
    SortDirectionModal-->>RepoList: onSelect(direction)
    RepoList->>RepoList: Update sortDir, reset cursor, close modal
    RepoList->>UIPrefs: storeUIPrefs({ sortDir })
  else Cancel
    SortDirectionModal-->>RepoList: onCancel()
    RepoList->>RepoList: Close modal (no changes)
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

I tap my paws: D opens the sky,
A gentle modal drifts softly by.
Asc or desc, I pick with glee,
Stars align for repos and me.
With one bright hop I choose the way—
Sorted dreams for a tidy day. 🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/sort-direction-modal

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (7)
README.md (2)

76-76: Tighten wording to name the keys explicitly

Spelling out the keys here improves scannability and mirrors the controls section.

-- **Interactive Sorting**: Modal-based sort selection (updated, pushed, name, stars) with modal-based direction selection
+- **Interactive Sorting**: Modal-based sort selection (S) and direction selection (D) — options: updated, pushed, name, stars

267-267: Document in‑modal shortcuts for consistency with the new UX

Mention A/D and Esc/C so the README matches the modal help line and PR description.

-- **Sort Direction**: `D` to open sort direction modal (ascending/descending)
+- **Sort Direction**: `D` to open sort direction modal (ascending/descending). In the modal: `A` = Ascending, `D` = Descending, `Esc`/`C` = Cancel.
src/ui/components/modals/SortDirectionModal.tsx (2)

172-176: Expose all relevant shortcuts in the hint

The modal supports Left/Right and “C to cancel”; reflect that in the footer hint.

-        <Text color="gray" dimColor>
-          ↑↓/Enter • A/D • Esc
-        </Text>
+        <Text color="gray" dimColor>
+          ←→/↑↓/Enter • A/D • Esc/C
+        </Text>

136-136: Prefer chalk over Ink colour props (project guideline)

You’re already using chalk for most styling; consider switching these remaining color/dimColor usages to chalk for consistency and to avoid nested Text colour issues.

Example:

-      <Text color="gray" dimColor>Sorting by: {formatSortKey()}</Text>
+      <Text>{chalk.gray.dim(`Sorting by: ${formatSortKey()}`)}</Text>
@@
-              <Text color="gray" dimColor>
-                {'      '}{getButtonDescription(option)}
-              </Text>
+              <Text>{chalk.gray.dim(`      ${getButtonDescription(option)}`)}</Text>
@@
-        <Text color="gray" dimColor>
-          ←→/↑↓/Enter • A/D • Esc/C
-        </Text>
+        <Text>{chalk.gray.dim('←→/↑↓/Enter • A/D • Esc/C')}</Text>

Also applies to: 152-154, 172-175

src/ui/components/modals/index.ts (1)

8-8: Optionally re‑export the SortDirection type

This makes it easier for callers (e.g., RepoList) to import both the component and its type from one place.

 export { default as SortDirectionModal } from './SortDirectionModal';
+export type { SortDirection } from './SortDirectionModal';
src/ui/views/RepoList.tsx (2)

1492-1492: Include orgSwitcherOpen in modalOpen for consistent dimming

Minor consistency nit: when the organisation switcher is open, the header/container isn’t dimmed like other modals. Consider including orgSwitcherOpen.

-  const modalOpen = deleteMode || archiveMode || syncMode || logoutMode || infoMode || visibilityMode || sortMode || sortDirectionMode || changeVisibilityMode || copyUrlMode || renameMode;
+  const modalOpen = deleteMode || archiveMode || syncMode || logoutMode || infoMode || visibilityMode || sortMode || sortDirectionMode || changeVisibilityMode || copyUrlMode || renameMode || orgSwitcherOpen;

2016-2030: Avoid resetting cursor and persisting when direction is unchanged

Selecting the already-active direction currently resets the cursor and writes prefs, causing unnecessary UI updates. Guard on change and close the modal first for snappier UX.

-              onSelect={(direction) => {
-                setSortDir(direction);
-                setSortDirectionMode(false);
-                setCursor(0); // Reset cursor when direction changes
-                storeUIPrefs({ sortDir: direction });
-                // Will trigger refresh via useEffect
-              }}
+              onSelect={(direction) => {
+                setSortDirectionMode(false);
+                if (direction !== sortDir) {
+                  setSortDir(direction);
+                  setCursor(0); // Reset cursor only when direction actually changes
+                  storeUIPrefs({ sortDir: direction });
+                  // Will trigger refresh via useEffect
+                }
+              }}
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 56fdb74 and 609a71c.

📒 Files selected for processing (4)
  • README.md (2 hunks)
  • src/ui/components/modals/SortDirectionModal.tsx (1 hunks)
  • src/ui/components/modals/index.ts (1 hunks)
  • src/ui/views/RepoList.tsx (6 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use strict TypeScript with comprehensive types; avoid any without clear justification

Files:

  • src/ui/components/modals/index.ts
  • src/ui/components/modals/SortDirectionModal.tsx
  • src/ui/views/RepoList.tsx
src/ui/**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

src/ui/**/*.tsx: Implement React/Ink UI as functional components using hooks
Use chalk for colours instead of Ink colour props to avoid nested Text issues
Pre-colour strings and render within a single to prevent nested Text rendering issues
Use spacers for consistent terminal spacing

Files:

  • src/ui/components/modals/SortDirectionModal.tsx
  • src/ui/views/RepoList.tsx
src/**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

Use British English for all user-facing text (e.g., organisation, authorisation, colour)

Files:

  • src/ui/components/modals/SortDirectionModal.tsx
  • src/ui/views/RepoList.tsx
🧠 Learnings (1)
📚 Learning: 2025-09-05T11:52:17.573Z
Learnt from: CR
PR: wiiiimm/gh-manager-cli#0
File: AGENTS.md:0-0
Timestamp: 2025-09-05T11:52:17.573Z
Learning: Applies to src/github.ts : Select fields: name, nameWithOwner, description, visibility, isPrivate, isFork, isArchived, stargazerCount, forkCount, primaryLanguage, updatedAt, pushedAt, diskUsage

Applied to files:

  • README.md
🧬 Code graph analysis (4)
src/ui/components/modals/index.ts (2)
src/ui/components/modals/SortModal.tsx (8)
  • SortModal (13-172)
  • SortModalProps (7-11)
  • sort (116-123)
  • sort (107-114)
  • input (32-105)
  • option (138-150)
  • currentIndex (24-30)
  • sort (125-130)
src/ui/components/modals/VisibilityModal.tsx (1)
  • VisibilityModal (14-163)
src/ui/components/modals/SortDirectionModal.tsx (2)
src/ui/components/modals/SortModal.tsx (6)
  • SortModal (13-172)
  • sort (116-123)
  • SortModalProps (7-11)
  • sort (107-114)
  • option (138-150)
  • input (32-105)
src/ui/components/modals/VisibilityModal.tsx (1)
  • VisibilityModal (14-163)
src/ui/views/RepoList.tsx (2)
src/ui/components/modals/SortDirectionModal.tsx (1)
  • SortDirectionModal (14-179)
src/config/config.ts (1)
  • storeUIPrefs (96-100)
README.md (2)
src/ui/components/modals/SortModal.tsx (6)
  • sort (116-123)
  • SortModal (13-172)
  • sort (107-114)
  • SortModalProps (7-11)
  • currentIndex (24-30)
  • input (32-105)
src/ui/views/RepoList.main.tsx (1)
  • prev (944-948)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Cursor Bugbot
🔇 Additional comments (5)
src/ui/components/modals/index.ts (1)

8-8: LGTM — barrel re‑export added

Re‑exporting the modal here keeps imports consistent with other modals.

src/ui/views/RepoList.tsx (4)

12-12: Import of SortDirectionModal — LGTM

Barrel import looks correct and consistent with existing modal imports.


158-158: New sortDirectionMode state — LGTM

State flag integrates cleanly with existing modal flags.


1084-1087: Input correctly trapped while SortDirectionModal is open

Prevents parent handlers from interfering. Matches the pattern used for other modals.


1306-1307: D key opens SortDirectionModal — LGTM

Behaviour aligns with the updated UX and help footer.

Comment thread src/ui/components/modals/SortDirectionModal.tsx
- Import SortKey type from SortModal
- Update currentSortKey prop to use SortKey type instead of string
- Remove unnecessary default case in formatSortKey switch statement
- Ensures type safety and only allows valid sort keys
@wiiiimm wiiiimm merged commit 5209252 into main Sep 5, 2025
2 of 3 checks passed
wiiiimm pushed a commit that referenced this pull request Sep 5, 2025
# [1.32.0](v1.31.2...v1.32.0) (2025-09-05)

### Bug Fixes

* ensure processPRTitle function is always exported in workflow script ([8056aa3](8056aa3))

### Features

* Add sort direction modal for improved UX ([#26](#26)) ([5209252](5209252))
@wiiiimm
Copy link
Copy Markdown
Owner Author

wiiiimm commented Sep 5, 2025

🎉 This PR is included in version 1.32.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

♻️ Duplicate comments (1)
src/ui/components/modals/SortDirectionModal.tsx (1)

15-20: Props and interactions look solid

Clear, typed props and keyboard flows mirror SortModal. Nice reuse of the SortKey union.

🧹 Nitpick comments (5)
src/ui/components/modals/SortDirectionModal.tsx (5)

4-4: Use a type-only import for SortKey

Prevents an unnecessary runtime import and aligns with strict TS hygiene.

-import { SortKey } from './SortModal';
+import type { SortKey } from './SortModal';

135-135: Optional: prefer chalk.bold for consistency

Keeps all styling in chalk for consistency with the colour guideline.

-      <Text bold>Sort Direction</Text>
+      <Text>{chalk.bold('Sort Direction')}</Text>

59-68: Tab key handling: add a literal-tab fallback

Ink versions can differ on key.tab. Including input === '\t' improves portability without changing behaviour.

-    if (key.tab) {
+    if (key.tab || input === '\t') {

96-114: Exhaustiveness over defaults for SortKey switches

To surface future SortKey additions at compile-time, prefer exhaustive switches with an assertNever helper rather than default fallbacks.

// helper (top-level)
const assertNever = (x: never): never => { throw new Error(`Unhandled sort key: ${x}`); };

// getButtonDescription(...)
case 'desc':
  switch (currentSortKey) {
    case 'updated': return 'Most recently updated first';
    case 'pushed': return 'Most recently pushed first';
    case 'name': return 'Z to A';
    case 'stars': return 'Most stars first';
  }
  return assertNever(currentSortKey);

// formatSortKey()
switch (currentSortKey) {
  case 'updated': return 'Last Updated';
  case 'pushed': return 'Last Pushed';
  case 'name': return 'Name';
  case 'stars': return 'Stars';
}
return assertNever(currentSortKey);

Also applies to: 124-131


133-178: Optional: avoid hard-coded width

Fixed width={45} can truncate on narrow terminals or wrap on wide ones. Consider omitting width or deriving from content for better resilience.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 609a71c and 5e1e2e1.

📒 Files selected for processing (1)
  • src/ui/components/modals/SortDirectionModal.tsx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Use strict TypeScript with comprehensive types; avoid any without clear justification

Files:

  • src/ui/components/modals/SortDirectionModal.tsx
src/ui/**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

src/ui/**/*.tsx: Implement React/Ink UI as functional components using hooks
Use chalk for colours instead of Ink colour props to avoid nested Text issues
Pre-colour strings and render within a single to prevent nested Text rendering issues
Use spacers for consistent terminal spacing

Files:

  • src/ui/components/modals/SortDirectionModal.tsx
src/**/*.tsx

📄 CodeRabbit inference engine (AGENTS.md)

Use British English for all user-facing text (e.g., organisation, authorisation, colour)

Files:

  • src/ui/components/modals/SortDirectionModal.tsx
🧬 Code graph analysis (1)
src/ui/components/modals/SortDirectionModal.tsx (3)
src/ui/components/modals/SortModal.tsx (8)
  • SortKey (5-5)
  • SortModal (13-172)
  • sort (116-123)
  • SortModalProps (7-11)
  • sort (107-114)
  • option (138-150)
  • input (32-105)
  • sort (125-130)
src/ui/views/RepoList.tsx (1)
  • prev (1300-1304)
src/ui/views/RepoList.main.tsx (1)
  • prev (944-948)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Cursor Bugbot

Comment on lines +30 to +87
useInput((input, key) => {
if (key.escape || (input && input.toUpperCase() === 'C')) {
onCancel();
return;
}

if (key.leftArrow || key.upArrow) {
// Move selection up
if (focusedOption === 'cancel') {
// Move from cancel to last option
setFocusedOption(options[options.length - 1]);
} else if (focusedOption === 'asc') {
setFocusedOption('desc');
} else if (focusedOption === 'desc') {
// Stay at top
}
}

if (key.rightArrow || key.downArrow) {
// Move selection down
if (focusedOption === 'desc') {
setFocusedOption('asc');
} else if (focusedOption === 'asc') {
setFocusedOption('cancel');
} else if (focusedOption === 'cancel') {
// Stay at bottom
}
}

if (key.tab) {
// Tab through all options including cancel
if (focusedOption === 'desc') {
setFocusedOption('asc');
} else if (focusedOption === 'asc') {
setFocusedOption('cancel');
} else if (focusedOption === 'cancel') {
setFocusedOption('desc');
}
}

if (key.return) {
if (focusedOption === 'cancel') {
onCancel();
} else {
onSelect(focusedOption as SortDirection);
}
}

// Quick select shortcuts
if (input) {
const upperInput = input.toUpperCase();
if (upperInput === 'A') {
onSelect('asc');
} else if (upperInput === 'D') {
onSelect('desc');
}
}
});
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Sanity-check: parent closes modal on select/cancel

Handler calls rely on the parent to close the modal. Confirm the parent view sets sortDirectionMode false in both paths.


🏁 Script executed:

#!/bin/bash
# Verify that SortDirectionModal consumers close the modal on both onSelect and onCancel
rg -nP --type=ts --type=tsx -C3 "SortDirectionModal" |
  sed -n '1,200p'

Length of output: 96


🏁 Script executed:

#!/bin/bash
# Search for SortDirectionModal usage in .tsx files
rg -nP "SortDirectionModal" -C5 -g '*.tsx'

# Search for onSelect/onCancel props in SortDirectionModal usage
rg -nP "<SortDirectionModal[^>]*(onSelect|onCancel)" -C5 -g '*.tsx'

Length of output: 4479


Fix onCancel handler to close SortDirectionModal
In src/ui/views/RepoList.tsx (around line 2013), the onCancel prop of <SortDirectionModal> calls setSortMode(false)—this closes the sort-key modal instead of the sort-direction modal. Change it to setSortDirectionMode(false).

🤖 Prompt for AI Agents
In src/ui/components/modals/SortDirectionModal.tsx around lines 30-87 the
modal's onCancel is being handled in the parent (src/ui/views/RepoList.tsx ~line
2013) with setSortMode(false) which closes the wrong modal; update the parent
prop passed to SortDirectionModal so that onCancel calls
setSortDirectionMode(false) instead of setSortMode(false) (preserve any arrow
function/closure used and ensure correct typing/signature for the prop).

return (
<Box flexDirection="column" borderStyle="round" borderColor="cyan" paddingX={2} paddingY={1} width={45}>
<Text bold>Sort Direction</Text>
<Text color="gray" dimColor>Sorting by: {formatSortKey()}</Text>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Replace Ink colour props with chalk and pre-colour strings

Guideline asks to use chalk (and a single Text) to avoid nested Text issues. Also update the help hint to advertise “C” as cancel (supported in the handler).

-      <Text color="gray" dimColor>Sorting by: {formatSortKey()}</Text>
+      <Text>{chalk.dim.gray(`Sorting by: ${formatSortKey()}`)}</Text>
@@
-              <Text color="gray" dimColor>
-                {'      '}{getButtonDescription(option)}
-              </Text>
+              <Text>{chalk.dim.gray(`      ${getButtonDescription(option)}`)}</Text>
@@
-        <Text color="gray" dimColor>
-          ↑↓/Enter • A/D • Esc
-        </Text>
+        <Text>{chalk.dim.gray('↑↓/Enter • A/D • Esc/C')}</Text>

Also applies to: 152-154, 174-176

🤖 Prompt for AI Agents
In src/ui/components/modals/SortDirectionModal.tsx around line 136 (also applies
to 152-154 and 174-176): the current code uses Ink <Text> color/dimColor props
and nested Texts; replace those by using chalk to pre-color strings and render
them with a single <Text> each (no nested Text components), removing all
color/dimColor props on Text; update the help hint strings to advertise "C" as
cancel (e.g., include "[C]ancel" or "C: cancel") and ensure the cancel key is
shown consistently in those lines; keep the text content identical aside from
coloring and the updated cancel hint.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant