Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

feat: Add a new hotkey to handle cd-on-quit whenever needed#924

Merged
yorukot merged 3 commits into
yorukot:mainyorukot/superfile:mainfrom
ahmed-habbachi:feat/919/add-dedicated-hotkey-for-cd_on_quitahmed-habbachi/superfile:feat/919/add-dedicated-hotkey-for-cd_on_quitCopy head branch name to clipboard
Aug 14, 2025
Merged

feat: Add a new hotkey to handle cd-on-quit whenever needed#924
yorukot merged 3 commits into
yorukot:mainyorukot/superfile:mainfrom
ahmed-habbachi:feat/919/add-dedicated-hotkey-for-cd_on_quitahmed-habbachi/superfile:feat/919/add-dedicated-hotkey-for-cd_on_quitCopy head branch name to clipboard

Conversation

@ahmed-habbachi

@ahmed-habbachi ahmed-habbachi commented Jul 2, 2025

Copy link
Copy Markdown
Contributor

Resolves #923
This PR introduces a new hotkey defaulted to "shift+q" (cd_quit = ['Q']) to change directory upon quitting superfile.
I tried to add the new hotkey without affecting the cd-on-quit configuration, so it stays relevant for anyone that wants to always change directory when quitting.

Summary by CodeRabbit

  • New Features

    • Added a global hotkey “Cd Quit” (Q) to quit and change directory to the current folder. Available in default and Vim keymaps and configurable in hotkeys settings.
  • Documentation

    • Updated hotkey list with “Cd Quit,” including a note about required scripts.
    • Added “Cd Quit” entry to the in-app help menu.
  • Tests

    • Added test ensuring “Cd Quit” writes the expected change-directory command on exit.

@coderabbitai

coderabbitai Bot commented Jul 2, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

A new global hotkey cd_quit was introduced to trigger quitting with directory change. The model’s quit flow now accepts a cdOnQuit flag, set via the new hotkey or config. Help text, default hotkey configs, and docs were updated. A unit test validates that cd_quit writes the last directory and exits.

Changes

Cohort / File(s) Summary
Config types
src/internal/common/config_type.go
Added HotkeysType field CdQuit []string with TOML tag cd_quit.
Model logic
src/internal/model.go
Handle CdQuit in key input; pass cdOnQuit flag to quitSuperfile; updated quitSuperfile signature to accept cdOnQuit bool and use it to decide writing last directory. Consolidated var declarations.
Default/help text
src/internal/default_config.go
Added help entry for common.Hotkeys.CdQuit describing quitting and changing directory.
Hotkey configs
src/superfile_config/hotkeys.toml, src/superfile_config/vimHotkeys.toml
Added cd_quit = ['Q', ''] global hotkey binding.
Documentation
website/src/content/docs/list/hotkey-list.md
Documented cd_quit (Q), updated table formatting, and added note about requiring same scripts as cd_on_quit.
Tests
src/internal/model_test.go
Added subtest verifying CdQuit writes "cd ''" to LastDir and triggers TeaQuit with quitDone state.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant TUI as Superfile TUI
  participant Model as handleKeyInput
  participant Quit as quitSuperfile(cdOnQuit)
  participant FS as LastDir file

  User->>TUI: Press cd_quit (e.g., Shift+Q)
  TUI->>Model: Key event
  Model->>Model: Set cdOnQuit = true
  Model->>Quit: quitSuperfile(cdOnQuit=true)
  alt cdOnQuit true
    Quit->>FS: Write "cd '<currentDir>'"
  else cdOnQuit false
    Quit->>FS: Skip write
  end
  Quit-->>TUI: tea.Quit command
  TUI-->>User: Exit
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~15 minutes

Assessment against linked issues

Objective Addressed Explanation
Add dedicated hotkey to trigger cd_on_quit behavior [#923]
Support both normal quit and quit-with-cd via separate keybindings [#923]
Document the new hotkey in configs/help/docs [#923]

Assessment against linked issues: Out-of-scope changes

None found.

Poem

I tap Shift+Q with a thump-thump beat,
Hop out the burrow, cd to my street.
Two ways to quit, what a tidy feat—
Carrot in paw, configs complete.
Bye-bye, burrow; hello, new seat! 🥕🐇


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b5a8fbf and a84a942.

📒 Files selected for processing (1)
  • src/internal/model_test.go (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/internal/model_test.go
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 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 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.

@lazysegtree lazysegtree added the pr needs work PR needs work before it can be further reviewed/merged label Jul 2, 2025
@ahmed-habbachi

ahmed-habbachi commented Jul 2, 2025

Copy link
Copy Markdown
Contributor Author

If I am correct there is nothing I should do right? this is a normal failure for a first contribution?
well this is my first contribution to opensource project so let me know if I need to do something because I sow you added a tag pr needs work but there is nothing I can do I guess.

@ahmed-habbachi
ahmed-habbachi force-pushed the feat/919/add-dedicated-hotkey-for-cd_on_quit branch from 981eb1e to 66e358e Compare July 2, 2025 16:11
@lazysegtree

Copy link
Copy Markdown
Collaborator

@ahmed-habbachi

(1) Please add note about this in website/src/content/docs/list/hotkey-list.md . Make sure to call out that you still need to use that superfile bash function to make it work.

(2) Update src/superfile_config/vimHotkeys.toml

I will still need to test this. I am not sure how this will work, might need to set LastDir variable during model startup too.

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 0

🧹 Nitpick comments (2)
website/src/content/docs/list/hotkey-list.md (2)

19-22: Keep hotkey‐notation consistent with other uppercase bindings

Every other uppercase binding in this table adds the “(shift+X)” hint – e.g. A (shift+a), F, L (shift+l).
For consistency, append the hint to Q.

-| Quit superfile and cd to current folder | `Q`              | `cd_quit`        |
+| Quit superfile and cd to current folder | `Q` (shift+q)    | `cd_quit`        |

25-27: Grammar & clarity in the explanatory note

Minor wording tweaks improve readability and fix subject/verb agreement.

-Quit superfile and cd to current folder "cd_quit" require the same scripts as ["cd_on_quit"](/configure/superfile-config/#cd_on_quit) setting
+The `"cd_quit"` hotkey requires the same shell-integration scripts as the ["cd_on_quit"](/configure/superfile-config/#cd_on_quit) setting.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 66e358e and 8f28d0c.

📒 Files selected for processing (3)
  • src/superfile_config/hotkeys.toml (1 hunks)
  • src/superfile_config/vimHotkeys.toml (1 hunks)
  • website/src/content/docs/list/hotkey-list.md (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • src/superfile_config/vimHotkeys.toml
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/superfile_config/hotkeys.toml
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: lazysegtree
PR: yorukot/superfile#0
File: :0-0
Timestamp: 2025-04-12T12:00:32.688Z
Learning: In PR #767 for yorukot/superfile, the focus is on moving code (especially sidebar-related functionality) to a more organized structure without changing functionality. Pre-existing issues should be ignored since the purpose is code reorganization, not fixing existing problems.
Learnt from: lazysegtree
PR: yorukot/superfile#781
File: src/internal/ui/sidebar/render.go:46-48
Timestamp: 2025-04-28T03:48:46.327Z
Learning: The user (lazysegtree) prefers to keep PRs focused and manageable in size, sometimes intentionally leaving TODO comments to track minor issues for later PRs rather than addressing everything at once.
website/src/content/docs/list/hotkey-list.md (1)
Learnt from: lazysegtree
PR: yorukot/superfile#752
File: src/internal/ui/prompt/model.go:14-17
Timestamp: 2025-04-04T04:02:58.343Z
Learning: In the superfile codebase, hotkey configuration validation happens in the LoadHotkeysFile() function, which ensures that all hotkey slices are non-empty and contain valid values. If validation fails, the application exits early with an error message, eliminating the need for runtime checks when accessing slice elements.

@ahmed-habbachi

Copy link
Copy Markdown
Contributor Author

@ahmed-habbachi

(1) Please add note about this in website/src/content/docs/list/hotkey-list.md . Make sure to call out that you still need to use that superfile bash function to make it work.

(2) Update src/superfile_config/vimHotkeys.toml

I will still need to test this. I am not sure how this will work, might need to set LastDir variable during model startup too.

In this issue I didn't rework the cd on quit functionality and I wanted to keep the cd_on_quit config working for those who needs it and as it is my first commit (tbh), I'll probably pick the enhancement issue after wards #706

@lazysegtree

lazysegtree commented Jul 4, 2025

Copy link
Copy Markdown
Collaborator

@ahmed-habbachi The problem is current implementation will lead to invalid behaviour.

The cd on quit functionality is not designed in a way that you can simple toggle it via hotkeys like this. The spf bash function doesn't cares about whether user pressed Q or Shift+Q, it always cds to what is in LastDir file.

Consider this

  • User enable cd_on_quit via the spf bash function that we have provided ( See website's tutorial for more info)
  • User keeps cd_on_quit as false in his config
  • User visits /a/b and presses Shift+Q
  • /a/b is written in LastDir file
  • spf changes directory to /a/b
  • User opens spf again, visits /a and presses Q to quit
  • But /a/b is still written in LastDir file
  • spf will change the directory to /a/b

@yorukot Please make sure to have a valid behaviour before merging this.

@yorukot

yorukot commented Jul 6, 2025

Copy link
Copy Markdown
Owner

I agree this should be fixed.
Right now it behaves in a way that can confuse users, so we need to make it more consistent.

@ahmed-habbachi

Copy link
Copy Markdown
Contributor Author

its been a long time that I did work on this but I tried to reproduce the issue but I couldn't the LastDir file is being removed by the shell function I guess.
So currently using the latest provided shell function for cd_on_quit and this branch works fine I did tryout all the scenarios.
feel free to guide me through a test case that I need to do to reproduce the issue, but I think until there is a way to do it better this a working solution that I am using already without issues.

@lazysegtree

Copy link
Copy Markdown
Collaborator

@ahmed-habbachi you are right

rm -f -- "$SPF_LAST_DIR" > /dev/null

There is this line in the cd_on_quit function. That cleans the file. So there wont be any issue. My above comment about invalid behaviour isn't valid.

Please (1) Rebase your branch with latest master
(2) Add a new testcase in model_test.go under TestQuit that validates that LastDir file gets written when you quit with Shift+Q

We can help you if you have less time, or have technical difficulties, reach out to us here, or on discord.

@ahmed-habbachi
ahmed-habbachi force-pushed the feat/919/add-dedicated-hotkey-for-cd_on_quit branch from 8f28d0c to 2fbb93b Compare August 8, 2025 17:18

@codescene-delta-analysis codescene-delta-analysis Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Gates Failed
Prevent hotspot decline (2 hotspots with Large Method, Complex Method)

Gates Passed
2 Quality Gates Passed

See analysis details in CodeScene

Reason for failure
Prevent hotspot decline Violations Code Health Impact
default_config.go 1 rule in this hotspot 8.89 → 8.87 Suppress
model.go 1 rule in this hotspot 8.20 → 8.19 Suppress

Quality Gate Profile: The Bare Minimum
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.

Comment thread src/internal/default_config.go
Comment thread src/internal/model.go

@coderabbitai coderabbitai Bot left a comment

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.

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/internal/model_test.go (1)

103-103: Tighten wording for readability

Use a concise, consistent phrasing for the checklist comment and subtest name.

-    // 3 - Cd on quit test that LastDir is written on
+    // 3 - CdQuit writes LastDir file
-    t.Run("Cd on quit test that LastDir is written on", func(t *testing.T) {
+    t.Run("CdQuit writes LastDir file", func(t *testing.T) {

Also applies to: 143-143

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8f28d0c and 2fbb93b.

📒 Files selected for processing (7)
  • src/internal/common/config_type.go (1 hunks)
  • src/internal/default_config.go (1 hunks)
  • src/internal/model.go (6 hunks)
  • src/internal/model_test.go (2 hunks)
  • src/superfile_config/hotkeys.toml (1 hunks)
  • src/superfile_config/vimHotkeys.toml (1 hunks)
  • website/src/content/docs/list/hotkey-list.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (6)
  • src/superfile_config/hotkeys.toml
  • src/superfile_config/vimHotkeys.toml
  • src/internal/common/config_type.go
  • src/internal/default_config.go
  • src/internal/model.go
  • website/src/content/docs/list/hotkey-list.md
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: lazysegtree
PR: yorukot/superfile#0
File: :0-0
Timestamp: 2025-04-12T12:00:32.688Z
Learning: In PR #767 for yorukot/superfile, the focus is on moving code (especially sidebar-related functionality) to a more organized structure without changing functionality. Pre-existing issues should be ignored since the purpose is code reorganization, not fixing existing problems.
Learnt from: lazysegtree
PR: yorukot/superfile#781
File: src/internal/ui/sidebar/render.go:46-48
Timestamp: 2025-04-28T03:48:46.327Z
Learning: The user (lazysegtree) prefers to keep PRs focused and manageable in size, sometimes intentionally leaving TODO comments to track minor issues for later PRs rather than addressing everything at once.
Learnt from: lazysegtree
PR: yorukot/superfile#781
File: src/internal/model_render.go:254-256
Timestamp: 2025-04-28T04:27:33.074Z
Learning: When race conditions or other issues that are unrelated to the current PR's focus are identified during review, lazysegtree prefers creating separate GitHub issues to track them rather than addressing them in the current PR. This helps maintain PR focus and scope.
Learnt from: lazysegtree
PR: yorukot/superfile#979
File: src/internal/common/predefined_variable.go:47-47
Timestamp: 2025-08-06T10:54:31.417Z
Learning: When lazysegtree says a review is "inaccurate and pre-existing issues. Not much useful," it means I should focus specifically on bugs or problems introduced by the current PR changes, not architectural concerns or code quality issues that were already present. The refactoring work in superfile PRs is generally well-implemented and should be evaluated on whether the specific changes work correctly, not on broader codebase architecture.
Learnt from: lazysegtree
PR: yorukot/superfile#967
File: src/internal/key_function.go:45-47
Timestamp: 2025-08-02T11:47:07.713Z
Learning: lazysegtree prefers to track technical debt and architectural improvements in dedicated GitHub issues when they are identified during PR reviews but are beyond the scope of the current PR, particularly for complex refactoring needs like input handling architecture that would require significant changes.
Learnt from: lazysegtree
PR: yorukot/superfile#970
File: src/internal/ui/processbar/model.go:11-26
Timestamp: 2025-08-02T17:00:37.262Z
Learning: lazysegtree prefers to track memory leak issues and feature enhancements via dedicated GitHub issues when identified during PR reviews but are beyond the current PR scope, particularly for processbar-related improvements like cleanup mechanisms and keyboard shortcuts.
🔇 Additional comments (1)
src/internal/model_test.go (1)

153-164: Good addition: validates CdQuit behavior end-to-end

The subtest correctly drives CdQuit, asserts quit state, and verifies LastDir contents. This aligns with the requested coverage for the new hotkey.

Comment thread src/internal/model_test.go Outdated
@lazysegtree

lazysegtree commented Aug 9, 2025

Copy link
Copy Markdown
Collaborator

Thanks @ahmed-habbachi .

Can you (1) Can you make sure to pass CICD build. Use dev.sh to run tests and linter locally.

(2) There are new changes in the repo. Can you rebase again.

Comment thread src/internal/model_test.go Outdated
Comment thread src/internal/model_test.go Outdated
Comment thread website/src/content/docs/list/hotkey-list.md
Add note about the new hotkey in the website in both the hotkey-list and
vimHotkeys
Add a note to mention that we still need the scripts from cd_on_quit
config
@ahmed-habbachi
ahmed-habbachi force-pushed the feat/919/add-dedicated-hotkey-for-cd_on_quit branch from 2fbb93b to ed0df6e Compare August 12, 2025 08:46

@codescene-delta-analysis codescene-delta-analysis Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Gates Failed
Prevent hotspot decline (2 hotspots with Large Method, Complex Method)

Gates Passed
2 Quality Gates Passed

See analysis details in CodeScene

Reason for failure
Prevent hotspot decline Violations Code Health Impact
default_config.go 1 rule in this hotspot 8.89 → 8.87 Suppress
model.go 1 rule in this hotspot 8.28 → 8.27 Suppress

Quality Gate Profile: The Bare Minimum
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.

@lazysegtree

Copy link
Copy Markdown
Collaborator

@ahmed-habbachi

image

FYI, The test is still failing.

@ahmed-habbachi
ahmed-habbachi force-pushed the feat/919/add-dedicated-hotkey-for-cd_on_quit branch from ed0df6e to b5a8fbf Compare August 13, 2025 00:01

@codescene-delta-analysis codescene-delta-analysis Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Gates Failed
Prevent hotspot decline (2 hotspots with Large Method, Complex Method)

Gates Passed
2 Quality Gates Passed

See analysis details in CodeScene

Reason for failure
Prevent hotspot decline Violations Code Health Impact
default_config.go 1 rule in this hotspot 8.89 → 8.87 Suppress
model.go 1 rule in this hotspot 8.28 → 8.27 Suppress

Quality Gate Profile: The Bare Minimum
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.

@ahmed-habbachi

Copy link
Copy Markdown
Contributor Author

@ahmed-habbachi
image

FYI, The test is still failing.

@lazysegtree I wasn't comfortable with the test results as when I test it shows everything passed but I think I didn't run the unit test properly, the issue was that I am accessing the LastDir variable directly from the config and it is not pointing the correct file path I had to use this instead: lastDirFile := filepath.Join(variable.SuperFileStateDir, "lastdir")

@lazysegtree

Copy link
Copy Markdown
Collaborator

@ahmed-habbachi Use this to run test.

~/Workspace/kuknitin/superfile git:(main) [8:39:52] make dev
🚀 Starting superfile development workflow

==> Tidying Go modules...
✓ Go modules tidied
==> Formatting Go code...
✓ Code formatted
==> Running golangci-lint...
✓ Linting passed
==> Running unit tests...
?   	github.com/yorukot/superfile	[no test files]
?   	github.com/yorukot/superfile/src/cmd	[no test files]
?   	github.com/yorukot/superfile/src/config	[no test files]
?   	github.com/yorukot/superfile/src/config/icon	[no test files]
ok  	github.com/yorukot/superfile/src/internal	(cached)
ok  	github.com/yorukot/superfile/src/internal/common	(cached)
?   	github.com/yorukot/superfile/src/internal/ui	[no test files]
ok  	github.com/yorukot/superfile/src/internal/ui/metadata	(cached)
?   	github.com/yorukot/superfile/src/internal/ui/notify	[no test files]
ok  	github.com/yorukot/superfile/src/internal/ui/processbar	(cached)
ok  	github.com/yorukot/superfile/src/internal/ui/prompt	(cached)
ok  	github.com/yorukot/superfile/src/internal/ui/rendering	(cached)
ok  	github.com/yorukot/superfile/src/internal/ui/sidebar	(cached)
ok  	github.com/yorukot/superfile/src/internal/utils	(cached)
?   	github.com/yorukot/superfile/src/pkg/file_preview	[no test files]
?   	github.com/yorukot/superfile/src/pkg/string_function	[no test files]
✓ Unit tests passed
==> Building spf binary...
✓ Build completed successfully

🎉 All steps completed successfully!
Binary location: ./bin/spf
Binary size:  21M
➜  ~/Workspace/kuknitin/superfile git:(main) [8:39:59]

@lazysegtree

Copy link
Copy Markdown
Collaborator

To run your specific test

~/Workspace/kuknitin/superfile git:(main) [8:40:41] go test github.com/yorukot/superfile/src/internal -run="TestQuit" -coun
t=1
ok  	github.com/yorukot/superfile/src/internal	0.318s
➜  ~/Workspace/kuknitin/superfile git:(main) [8:40:55]

@ahmed-habbachi
ahmed-habbachi force-pushed the feat/919/add-dedicated-hotkey-for-cd_on_quit branch from b5a8fbf to a84a942 Compare August 13, 2025 10:46

@codescene-delta-analysis codescene-delta-analysis Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Gates Failed
Prevent hotspot decline (2 hotspots with Large Method, Complex Method)

Gates Passed
2 Quality Gates Passed

See analysis details in CodeScene

Reason for failure
Prevent hotspot decline Violations Code Health Impact
default_config.go 1 rule in this hotspot 8.89 → 8.87 Suppress
model.go 1 rule in this hotspot 8.28 → 8.27 Suppress

Quality Gate Profile: The Bare Minimum
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.

@lazysegtree lazysegtree left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM. Validated changes via manual testing.

Comment thread src/internal/common/config_type.go
@yorukot
yorukot merged commit f15e7a3 into yorukot:main Aug 14, 2025
7 of 8 checks passed
@ahmed-habbachi
ahmed-habbachi deleted the feat/919/add-dedicated-hotkey-for-cd_on_quit branch August 14, 2025 19:32
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Oct 15, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [yorukot/superfile](https://github.com/yorukot/superfile) | minor | `v1.3.3` -> `v1.4.0` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>yorukot/superfile (yorukot/superfile)</summary>

### [`v1.4.0`](https://github.com/yorukot/superfile/releases/tag/v1.4.0)

[Compare Source](yorukot/superfile@v1.3.3...v1.4.0)

Hey folks. Releasing v1.4.0 with many new features, improvements, and bug fixes.

We have an async file preview now, a zoxide panel, and various new features improving UX.

#### Install:

[**Click me to know how to install**](https://github.com/yorukot/superfile?tab=readme-ov-file#installation)

#### Highlights

- We have the Zoxide Panel now. Ensure zoxide is installed on your system, set `zoxide_support` to `true` in the config, and press `z` to use zoxide. <img width="645" height="295" alt="Image" src="https://github.com/user-attachments/assets/238f6549-5318-49d1-a3a0-14cf8a686955" />

- File previewing is now async, meaning reduced lag while scrolling through images, or on slow systems.

- Many bug fixes. See 'Detailed Change Summary'

##### Internal Updates

- Most file operations are now truly async with the usage of the recommended `tea.Cmd` pattern.
- Enabled many new linters to improve code quality.
- Moved golangci-lint to v2. Now developers don't need to keep the old v1 in their systems.
- Refactored file preview in its own package for better maintainability and readability.
- Fixed flaky unit tests.

#### Detailed Change Summary

<details><summary>Details</summary>
<p>

##### Update
- feat: File operation via tea cmd [#&#8203;963](yorukot/superfile#963) by @&#8203;lazysegtree
- feat: processbar improvements, package separation, better channel management [#&#8203;973](yorukot/superfile#973) by @&#8203;lazysegtree
- feat: enable lll and recvcheck linter, fix tests, more refactors [#&#8203;977](yorukot/superfile#977) by @&#8203;lazysegtree
- feat: Remove channel for notification models [#&#8203;979](yorukot/superfile#979) by @&#8203;lazysegtree
- feat: enable cyclop, funlen, gocognit, gocyclo linters, and refactor large functions [#&#8203;984](yorukot/superfile#984) by @&#8203;lazysegtree
- feat: Add a new hotkey to handle cd-on-quit whenever needed [#&#8203;924](yorukot/superfile#924) by @&#8203;ahmed-habbachi
- feat: added option to permanently delete files [#&#8203;987](yorukot/superfile#987) by @&#8203;hupender
- feat: Preview panel separation [#&#8203;1021](yorukot/superfile#1021) by @&#8203;lazysegtree
- feat: Add search functionality to help menu [#&#8203;1011](yorukot/superfile#1011) by @&#8203;iZarrios
- feat: Use zoxide lib [#&#8203;1036](yorukot/superfile#1036) by @&#8203;lazysegtree
- feat: Add zoxide directory tracking on navigation [#&#8203;1041](yorukot/superfile#1041) by @&#8203;lazysegtree
- feat: Zoxide integration [#&#8203;1039](yorukot/superfile#1039) by @&#8203;lazysegtree
- feat: Select mode with better feedback [#&#8203;1074](yorukot/superfile#1074) by @&#8203;lazysegtree
- feat: owner/group in the metadata [#&#8203;1093](yorukot/superfile#1093) by @&#8203;xelavopelk
- feat: Async zoxide [#&#8203;1104](yorukot/superfile#1104) by @&#8203;lazysegtree

##### Bug Fix
- fix: sorting in searchbar [#&#8203;985](yorukot/superfile#985) by @&#8203;hupender
- fix: Async rendering, Include clipboard check in paste items, and update linter configs [#&#8203;997](yorukot/superfile#997) by @&#8203;lazysegtree
- fix: Move utility functions to utils package [#&#8203;1012](yorukot/superfile#1012) by @&#8203;lazysegtree
- fix: Refactoring and separation of preview panel and searchbar in help menu [#&#8203;1013](yorukot/superfile#1013) by @&#8203;lazysegtree
- fix(filePanel): allow focusType to be set correctly [#&#8203;1033](yorukot/superfile#1033) by @&#8203;faisal-990
- fix(ci): Update gomod2nix.toml, allow pre release in version output, release 1.4.0-rc1, bug fixes, and improvements [#&#8203;1054](yorukot/superfile#1054) by @&#8203;lazysegtree
- fix(nix): resolve build failures in the nix flake [#&#8203;1068](yorukot/superfile#1068) by @&#8203;Frost-Phoenix
- fix: Retry the file deletion to prevent flakies (#&#8203;938) [#&#8203;1076](yorukot/superfile#1076) by @&#8203;lazysegtree
- fix(issue-1066): Fixed issue where enter was not searchable [#&#8203;1078](yorukot/superfile#1078) by @&#8203;Simpaqt
- fix(#&#8203;1073): Tech debt fix [#&#8203;1077](yorukot/superfile#1077) by @&#8203;Simpaqt
- fix: fix deleted directory not able to remove from pins (#&#8203;1067) [#&#8203;1081](yorukot/superfile#1081) by @&#8203;yorukot
- fix: fix child process spawning attached [#&#8203;1084](yorukot/superfile#1084) by @&#8203;guemidiborhane
- fix: always clear images when showing a FullScreenStyle [#&#8203;1094](yorukot/superfile#1094) by @&#8203;snikoletopoulos
- fix: Allow j and k keys in zoxide [#&#8203;1102](yorukot/superfile#1102) by @&#8203;lazysegtree
- fix: Zoxide improvements and 1.4.0-rc2 [#&#8203;1105](yorukot/superfile#1105) by @&#8203;lazysegtree
- fix: rename cursor beginning on wrong character because of multiple dots in name (#&#8203;813) [#&#8203;1112](yorukot/superfile#1112) by @&#8203;SyedAsadK
- fix: check and fix file panel scroll position on height changes [#&#8203;1095](yorukot/superfile#1095) by @&#8203;snikoletopoulos

##### Optimization
- perf(website): optimize font loading and asset organization [#&#8203;1089](yorukot/superfile#1089) by @&#8203;yorukot

##### Documentation
- docs: fix incorrect zoxide plugin config name [#&#8203;1049](yorukot/superfile#1049) by @&#8203;shree-xvi
- docs(hotkeys): Fix typo in vimHotkeys.toml comments [#&#8203;1080](yorukot/superfile#1080) by @&#8203;wleoncio
- docs: add section for core maintainers in README.md [#&#8203;1088](yorukot/superfile#1088) by @&#8203;yorukot
- chore: add winget install instruction to readme and website [#&#8203;943](yorukot/superfile#943) by @&#8203;claykom

##### Dependencies
- chore(deps): update dependency go to v1.25.0, golangci-lint to v2, golangci-lint actions to v8 [#&#8203;750](yorukot/superfile#750) by @&#8203;renovate[bot]
- chore(deps): update amannn/action-semantic-pull-request action to v6 [#&#8203;1006](yorukot/superfile#1006) by @&#8203;renovate[bot]
- chore(deps): update actions/first-interaction action to v3 [#&#8203;1005](yorukot/superfile#1005) by @&#8203;renovate[bot]
- chore(deps): update actions/checkout action to v5 [#&#8203;1004](yorukot/superfile#1004) by @&#8203;renovate[bot]
- chore(deps): bump astro from 5.10.1 to 5.12.8 [#&#8203;982](yorukot/superfile#982) by @&#8203;dependabot[bot]
- fix(deps): update module golang.org/x/mod to v0.27.0 [#&#8203;989](yorukot/superfile#989) by @&#8203;renovate[bot]
- fix(deps): update dependency @&#8203;expressive-code/plugin-collapsible-sections to v0.41.3 [#&#8203;990](yorukot/superfile#990) by @&#8203;renovate[bot]
- fix(deps): update dependency sharp to v0.34.3 [#&#8203;992](yorukot/superfile#992) by @&#8203;renovate[bot]
- fix(deps): update dependency @&#8203;expressive-code/plugin-line-numbers to v0.41.3 [#&#8203;991](yorukot/superfile#991) by @&#8203;renovate[bot]
- chore(deps): update dependency go to v1.25.0 [#&#8203;994](yorukot/superfile#994) by @&#8203;renovate[bot]
- fix(deps): update astro monorepo [#&#8203;995](yorukot/superfile#995) by @&#8203;renovate[bot]
- fix(deps): update dependency @&#8203;astrojs/starlight to ^0.35.0 [#&#8203;1000](yorukot/superfile#1000) by @&#8203;renovate[bot]
- fix(deps): update module github.com/urfave/cli/v3 to v3.4.1 [#&#8203;1001](yorukot/superfile#1001) by @&#8203;renovate[bot]
- fix(deps): update module golang.org/x/text to v0.28.0 [#&#8203;1003](yorukot/superfile#1003) by @&#8203;renovate[bot]

##### Misc
- chore: migrate from superfile.netlify.app to superfile.dev [#&#8203;1087](yorukot/superfile#1087) by @&#8203;yorukot
- refactor(filepanel): replace filePanelFocusType with isFocused boolean [#&#8203;1040](yorukot/superfile#1040) by @&#8203;faisal-990
- refactor(ansi): Migrate from github.com/charmbracelet/x/exp/term/ansi to github.com/charmbracelet/x/ansi [#&#8203;1044](yorukot/superfile#1044) by @&#8203;faisal-990
- refactor: common operation on pinned directory file using PinnedManager [#&#8203;1085](yorukot/superfile#1085) by @&#8203;Manaswa-S
- test: unit tests for pinned manager [#&#8203;1090](yorukot/superfile#1090) by @&#8203;Manaswa-S

</p>
</details> 

#### New Contributors
* @&#8203;hupender made their first contribution in yorukot/superfile#985
* @&#8203;ahmed-habbachi made their first contribution in yorukot/superfile#924
* @&#8203;iZarrios made their first contribution in yorukot/superfile#1011
* @&#8203;faisal-990 made their first contribution in yorukot/superfile#1033
* @&#8203;shree-xvi made their first contribution in yorukot/superfile#1049
* @&#8203;Simpaqt made their first contribution in yorukot/superfile#1078
* @&#8203;wleoncio made their first contribution in yorukot/superfile#1080
* @&#8203;guemidiborhane made their first contribution in yorukot/superfile#1084
* @&#8203;Manaswa-S made their first contribution in yorukot/superfile#1085
* @&#8203;xelavopelk made their first contribution in yorukot/superfile#1093
* @&#8203;snikoletopoulos made their first contribution in yorukot/superfile#1094
* @&#8203;SyedAsadK made their first contribution in yorukot/superfile#1112

**Full Changelog**: <yorukot/superfile@v1.3.3...v1.4.0>

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS4xNDYuMCIsInVwZGF0ZWRJblZlciI6IjQxLjE0Ni4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
@lazysegtree lazysegtree mentioned this pull request Jul 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr needs work PR needs work before it can be further reviewed/merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add dedicated hotkey (e.g. Shift+Q) for cd_on_quit behavior

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.