fix: use rendering.MinHeightForBorder while checking for border, and more fixes#1267
fix: use rendering.MinHeightForBorder while checking for border, and more fixes#1267
Conversation
📝 WalkthroughWalkthroughRelocates JSON init from startup to the pinned-file manager, adds utils.InitJSONFile, parameterizes test model preview behavior, initializes batCmd in the preview model, introduces border-size constants, and removes several debug log statements and downgrades some error logs. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
🧰 Additional context used🧠 Learnings (7)📓 Common learnings📚 Learning: 2025-04-28T04:02:28.747ZApplied to files:
📚 Learning: 2025-08-27T11:32:17.326ZApplied to files:
📚 Learning: 2025-12-25T04:09:23.241ZApplied to files:
📚 Learning: 2025-05-22T04:42:07.369ZApplied to files:
📚 Learning: 2025-09-09T14:23:14.164ZApplied to files:
📚 Learning: 2025-03-29T13:20:46.467ZApplied to files:
⏰ 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). (2)
🔇 Additional comments (1)
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. Comment |
Deploying superfile with
|
| Latest commit: |
205949e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://fd5f7178.superfile.pages.dev |
| Branch Preview URL: | https://code-fixes.superfile.pages.dev |
571aecd to
de5864e
Compare
…d TODO comment about package restructuring
de5864e to
8812a5e
Compare
…ld be due to incomplete tooling in user's machine
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (3)
src/pkg/file_preview/kitty.go (1)
144-149: Good documentation of architectural debt.The TODO correctly identifies that
pkgpackages should not depend oninternalpackages. The suggested refactoring path (movingcommon.VideoExtensionstofixed_variablesandinternal/common/utilstopkg/utils) is sound.Consider tracking this in a dedicated GitHub issue to ensure it gets addressed in a future PR focused on package restructuring.
Based on learnings, lazysegtree prefers tracking architectural improvements in separate issues when identified during PR reviews.
src/internal/test_utils.go (1)
27-58: Test utility refactoring looks good.The addition of the
disablePreviewparameter tosetModelParamsForTestprovides better control over file preview behavior in tests, aligning with the initialization concerns documented insrc/internal/ui/preview/model.go. The new helper functions (defaultTestModelWithFooterAndFilePreviewanddefaultTestModelWithFilePreview) offer clear, purpose-specific test model creation.The implementation correctly closes the FilePreview when
disablePreviewis true, avoiding unnecessary IO operations and terminal cell size detection in tests.The TODO comment on lines 32-33 suggests a functional options pattern (e.g.,
WithZClient(),WithFooter()), which would provide a more flexible and composable API if additional test model variations are needed in the future.src/internal/ui/rendering/constants.go (1)
22-23: Consider adding documentation comments for consistency.The new constants lack documentation comments, while all other constants in this file include explanatory comments. Adding brief comments would improve consistency and clarity.
📝 Suggested documentation
+ // MinWidthForBorder is the minimum width required to render a border MinWidthForBorder = 2 + // MinHeightForBorder is the minimum height required to render a border MinHeightForBorder = 2Otherwise, the constants are correctly exported for cross-package usage and the values appropriately represent minimum border dimensions.
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (16)
src/cmd/main.gosrc/internal/default_config.gosrc/internal/file_operation_compress_test.gosrc/internal/model_layout_test.gosrc/internal/model_test.gosrc/internal/test_utils.gosrc/internal/ui/preview/model.gosrc/internal/ui/processbar/model_update.gosrc/internal/ui/rendering/constants.gosrc/internal/ui/rendering/renderer.gosrc/internal/ui/sidebar/pinned.gosrc/internal/ui/sidebar/render.gosrc/internal/ui/spf_renderers.gosrc/internal/utils/file_utils.gosrc/pkg/file_preview/kitty.gosrc/pkg/file_preview/thumbnail_generator.go
💤 Files with no reviewable changes (4)
- src/internal/file_operation_compress_test.go
- src/internal/ui/sidebar/render.go
- src/internal/ui/processbar/model_update.go
- src/cmd/main.go
🧰 Additional context used
🧠 Learnings (12)
📓 Common learnings
Learnt from: lazysegtree
Repo: yorukot/superfile PR: 1021
File: .gitignore:37-37
Timestamp: 2025-08-27T11:32:17.326Z
Learning: In PR #1021 for yorukot/superfile, lazysegtree reported image preview crashes and rename test failures after refactoring FilePreviewPanel to a separate preview package. The crashes were likely caused by: 1) imagePreviewer initialization differences between old global variable and new per-instance creation, 2) method name changes from SetContextWithRenderText to SetContentWithRenderText, and 3) batCmd initialization moving from global to per-instance without preserving the original configuration.
Learnt from: lazysegtree
Repo: yorukot/superfile PR: 1013
File: src/internal/utils/file_utils.go:252-275
Timestamp: 2025-08-24T03:25:10.117Z
Learning: In PR #1013 for yorukot/superfile, when reviewing the ReadFileContent utility function, lazysegtree chose to implement only the parameter renaming fix (filepath → filePath) to avoid shadowing and declined buffer size increases and optional truncation enhancements, preferring to keep the utility function scope focused and avoid over-engineering when the additional features aren't immediately needed.
Learnt from: lazysegtree
Repo: yorukot/superfile PR: 1021
File: .gitignore:37-37
Timestamp: 2025-08-27T11:32:17.326Z
Learning: In PR #1021 for yorukot/superfile, the tests were actually passing despite lazysegtree reporting crashes. The real issue was that production image preview crashes occurred during actual application usage due to duplicate ImagePreviewer instances (one in defaultModelConfig and one in preview.New()), while the test environment didn't stress the image preview system enough to expose the conflicts.
Learnt from: lazysegtree
Repo: yorukot/superfile PR: 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
Repo: yorukot/superfile PR: 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
Repo: yorukot/superfile PR: 1021
File: .gitignore:37-37
Timestamp: 2025-08-27T11:32:17.326Z
Learning: In PR #1021 for yorukot/superfile, the preview panel refactoring created duplicate ImagePreviewer instances (one in defaultModelConfig and another in preview.New()), which caused image preview crashes. The refactoring also renamed SetContextWithRenderText to SetContentWithRenderText, and moved global batCmd to per-instance batCmd initialization, all contributing to crashes during image preview and test failures.
Learnt from: lazysegtree
Repo: yorukot/superfile PR: 1021
File: .gitignore:37-37
Timestamp: 2025-08-27T11:32:17.326Z
Learning: In PR #1021 for yorukot/superfile, the image preview crashes and test failures were caused by duplicate ImagePreviewer initialization - one in defaultModelConfig() and another in preview.New(). This created two separate instances that conflicted in terminal state management, causing crashes during image preview operations and test execution.
Learnt from: lazysegtree
Repo: yorukot/superfile PR: 979
File: src/internal/common/predefined_variable.go:47-47
Timestamp: 2025-08-06T10:54:31.444Z
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
Repo: yorukot/superfile PR: 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
Repo: yorukot/superfile PR: 950
File: src/internal/ui/metadata/README.md:7-7
Timestamp: 2025-07-24T03:46:29.516Z
Learning: lazysegtree prefers to defer comprehensive unit testing to separate PRs when the current PR has grown too large, maintaining focus on the primary refactoring objectives while tracking testing requirements in dedicated GitHub issues.
Learnt from: lazysegtree
Repo: yorukot/superfile PR: 1081
File: src/internal/ui/sidebar/directory_utils.go:103-112
Timestamp: 2025-09-20T01:40:50.076Z
Learning: lazysegtree identified code duplication between removeNotExistingDirectories and TogglePinnedDirectory functions in src/internal/ui/sidebar/directory_utils.go, specifically 6 lines of JSON marshaling and file writing logic. He prefers to track such duplication fixes in separate GitHub issues and suggests either extracting common util functions or creating a PinnedDir manager for centralized Read/Write operations to PinnedFile.
Learnt from: lazysegtree
Repo: yorukot/superfile PR: 0
File: :0-0
Timestamp: 2025-04-12T12:25:06.352Z
Learning: PR #770 "Sidebar code separation" is a refactoring and code reorganization effort with no new features. It involves moving code, updating import paths, renaming functions to follow PascalCase convention, and consolidating sidebar-related functionality into a dedicated package.
Learnt from: lazysegtree
Repo: yorukot/superfile PR: 963
File: src/internal/default_config.go:16-16
Timestamp: 2025-07-27T07:40:51.938Z
Learning: lazysegtree prefers simpler implementation approaches when the alternatives are significantly more complex, even if the alternatives might be architecturally cleaner, prioritizing maintainability and avoiding over-engineering.
Learnt from: lazysegtree
Repo: yorukot/superfile PR: 963
File: src/internal/default_config.go:16-16
Timestamp: 2025-07-27T07:40:51.938Z
Learning: lazysegtree prefers simpler implementation approaches when the alternatives are significantly more complex, even if the alternatives might be architecturally cleaner, prioritizing maintainability and avoiding over-engineering.
Learnt from: lazysegtree
Repo: yorukot/superfile PR: 969
File: src/internal/key_function.go:40-40
Timestamp: 2025-08-03T09:34:55.721Z
Learning: lazysegtree emphasizes proper dependency direction in software architecture, preferring that low-level components (like modal handlers) should not depend on high-level components (like the main model object). He also prioritizes performance considerations, noting that creating objects on every keypress in hot code paths like key handling is inefficient and should be avoided.
Learnt from: lazysegtree
Repo: yorukot/superfile PR: 1013
File: src/internal/model_render.go:329-341
Timestamp: 2025-08-29T14:11:21.380Z
Learning: lazysegtree prefers to defer help menu rendering optimizations and other technical debt improvements to separate GitHub issues when the current PR scope has grown too large, maintaining focus on the primary refactoring objectives while tracking performance improvements for future work.
Learnt from: lazysegtree
Repo: yorukot/superfile PR: 985
File: src/internal/model.go:0-0
Timestamp: 2025-08-11T01:49:30.040Z
Learning: lazysegtree prefers maintaining code correctness through proper design and invariants rather than adding defensive bounds checks at every slice access point, viewing such defensive programming as "duct taping" that can mask actual bugs instead of fixing them at their source.
Learnt from: lazysegtree
Repo: yorukot/superfile PR: 973
File: src/internal/ui/processbar/model_update.go:7-27
Timestamp: 2025-08-03T14:49:31.221Z
Learning: lazysegtree prefers to keep test-only code simple without adding production-level concerns like goroutine synchronization, cancellation contexts, or complex lifecycle management, even when such patterns might prevent potential issues, since the complexity isn't justified for test utilities.
Learnt from: lazysegtree
Repo: yorukot/superfile PR: 1044
File: src/internal/utils/file_utils.go:149-149
Timestamp: 2025-09-09T13:29:11.771Z
Learning: lazysegtree prefers to keep PR scope focused on the primary objectives and considers pre-existing technical debt issues as out of scope for migration/refactoring PRs, preferring to defer such issues to separate GitHub issues rather than expanding the current PR scope.
Learnt from: lazysegtree
Repo: yorukot/superfile PR: 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
Repo: yorukot/superfile PR: 963
File: src/internal/handle_file_operations.go:567-570
Timestamp: 2025-07-27T08:49:09.687Z
Learning: lazysegtree prefers to defer technical debt issues like model mutation concerns to later PRs when the current PR has already grown too large, maintaining focus on the primary objectives while acknowledging the need to track such issues for future work.
📚 Learning: 2025-04-28T04:02:28.747Z
Learnt from: lazysegtree
Repo: yorukot/superfile PR: 781
File: src/internal/ui/rendering/border.go:104-114
Timestamp: 2025-04-28T04:02:28.747Z
Learning: The BorderConfig.GetBorder method in src/internal/ui/rendering/border.go already protects against negative availWidth values through the condition `actualWidth >= cnt*4` which ensures that availWidth is at least 1.
Applied to files:
src/internal/ui/rendering/renderer.gosrc/internal/ui/rendering/constants.gosrc/internal/ui/spf_renderers.go
📚 Learning: 2025-12-25T04:09:23.241Z
Learnt from: lazysegtree
Repo: yorukot/superfile PR: 1227
File: src/internal/common/config_type.go:94-94
Timestamp: 2025-12-25T04:09:23.241Z
Learning: In the superfile sidebar component (src/internal/ui/sidebar/), the SidebarWidth configuration value represents the sidebar content width excluding borders, while the minWidth = 7 constant in consts.go represents the minimum total width including borders. The actual sidebar width is computed as SidebarWidth + BorderPadding in sidebar.go's New() function.
Applied to files:
src/internal/ui/rendering/renderer.gosrc/internal/ui/rendering/constants.gosrc/internal/ui/spf_renderers.go
📚 Learning: 2025-09-09T14:23:14.164Z
Learnt from: lazysegtree
Repo: yorukot/superfile PR: 1044
File: src/internal/ui/rendering/truncate.go:6-6
Timestamp: 2025-09-09T14:23:14.164Z
Learning: The truncate test failure in src/internal/ui/rendering/truncate_test.go during the ANSI package migration from experimental to stable was caused by a truncation bug in the experimental package. The experimental package incorrectly truncated strings even when input length equaled maxWidth (e.g., "1234" with maxWidth=4 became "1..."), while the stable package correctly only truncates when input exceeds maxWidth. The test expectation was based on the buggy behavior and needs to be corrected.
Applied to files:
src/internal/ui/rendering/renderer.gosrc/internal/model_layout_test.go
📚 Learning: 2025-04-12T14:02:46.575Z
Learnt from: lazysegtree
Repo: yorukot/superfile PR: 770
File: src/internal/ui/sidebar/consts.go:16-16
Timestamp: 2025-04-12T14:02:46.575Z
Learning: In Go packages, constants and variables should only be exported (capitalized) if they need to be accessed from outside their package. In the sidebar package, constants like `sideBarInitialHeight` should remain unexported as they're only used within the package.
Applied to files:
src/internal/ui/rendering/constants.go
📚 Learning: 2025-09-20T01:40:50.076Z
Learnt from: lazysegtree
Repo: yorukot/superfile PR: 1081
File: src/internal/ui/sidebar/directory_utils.go:103-112
Timestamp: 2025-09-20T01:40:50.076Z
Learning: lazysegtree identified code duplication between removeNotExistingDirectories and TogglePinnedDirectory functions in src/internal/ui/sidebar/directory_utils.go, specifically 6 lines of JSON marshaling and file writing logic. He prefers to track such duplication fixes in separate GitHub issues and suggests either extracting common util functions or creating a PinnedDir manager for centralized Read/Write operations to PinnedFile.
Applied to files:
src/internal/ui/sidebar/pinned.go
📚 Learning: 2025-08-27T11:32:17.326Z
Learnt from: lazysegtree
Repo: yorukot/superfile PR: 1021
File: .gitignore:37-37
Timestamp: 2025-08-27T11:32:17.326Z
Learning: In PR #1021 for yorukot/superfile, the preview panel refactoring created duplicate ImagePreviewer instances (one in defaultModelConfig and another in preview.New()), which caused image preview crashes. The refactoring also renamed SetContextWithRenderText to SetContentWithRenderText, and moved global batCmd to per-instance batCmd initialization, all contributing to crashes during image preview and test failures.
Applied to files:
src/internal/ui/spf_renderers.gosrc/internal/model_layout_test.gosrc/internal/model_test.gosrc/internal/test_utils.gosrc/internal/ui/preview/model.go
📚 Learning: 2025-05-22T04:42:07.369Z
Learnt from: lazysegtree
Repo: yorukot/superfile PR: 825
File: src/internal/ui/rendering/renderer_core.go:95-108
Timestamp: 2025-05-22T04:42:07.369Z
Learning: In src/internal/ui/rendering/renderer_core.go, when truncating rendered output that exceeds the maximum height, we should drop all remaining lines after reaching totalHeight without adding an ellipsis or other truncation indicator, as the goal is to have exactly totalHeight lines.
Applied to files:
src/internal/ui/spf_renderers.go
📚 Learning: 2025-03-29T13:20:46.467Z
Learnt from: lazysegtree
Repo: yorukot/superfile PR: 730
File: src/internal/function.go:211-211
Timestamp: 2025-03-29T13:20:46.467Z
Learning: Empty panel.element checks should be added at the beginning of functions that access panel.element to prevent crashes when a panel has no elements, similar to using `if len(panel.element) == 0 { return }`.
Applied to files:
src/internal/ui/spf_renderers.go
📚 Learning: 2025-08-27T11:32:17.326Z
Learnt from: lazysegtree
Repo: yorukot/superfile PR: 1021
File: .gitignore:37-37
Timestamp: 2025-08-27T11:32:17.326Z
Learning: In PR #1021 for yorukot/superfile, the image preview crashes and test failures were caused by duplicate ImagePreviewer initialization - one in defaultModelConfig() and another in preview.New(). This created two separate instances that conflicted in terminal state management, causing crashes during image preview operations and test execution.
Applied to files:
src/internal/model_layout_test.gosrc/internal/model_test.gosrc/internal/test_utils.gosrc/internal/ui/preview/model.go
📚 Learning: 2025-08-27T11:32:17.326Z
Learnt from: lazysegtree
Repo: yorukot/superfile PR: 1021
File: .gitignore:37-37
Timestamp: 2025-08-27T11:32:17.326Z
Learning: In PR #1021 for yorukot/superfile, the tests were actually passing despite lazysegtree reporting crashes. The real issue was that production image preview crashes occurred during actual application usage due to duplicate ImagePreviewer instances (one in defaultModelConfig and one in preview.New()), while the test environment didn't stress the image preview system enough to expose the conflicts.
Applied to files:
src/internal/model_test.gosrc/internal/test_utils.go
📚 Learning: 2025-08-27T11:32:17.326Z
Learnt from: lazysegtree
Repo: yorukot/superfile PR: 1021
File: .gitignore:37-37
Timestamp: 2025-08-27T11:32:17.326Z
Learning: In PR #1021 for yorukot/superfile, lazysegtree reported image preview crashes and rename test failures after refactoring FilePreviewPanel to a separate preview package. The crashes were likely caused by: 1) imagePreviewer initialization differences between old global variable and new per-instance creation, 2) method name changes from SetContextWithRenderText to SetContentWithRenderText, and 3) batCmd initialization moving from global to per-instance without preserving the original configuration.
Applied to files:
src/internal/model_test.gosrc/internal/test_utils.gosrc/internal/ui/preview/model.go
🧬 Code graph analysis (4)
src/internal/ui/rendering/renderer.go (1)
src/internal/ui/rendering/constants.go (2)
MinWidthForBorder(22-22)MinHeightForBorder(23-23)
src/internal/utils/file_utils.go (1)
src/internal/utils/consts.go (1)
ConfigFilePerm(14-14)
src/internal/ui/sidebar/pinned.go (1)
src/internal/utils/file_utils.go (1)
InitJSONFile(284-291)
src/internal/ui/spf_renderers.go (2)
src/internal/common/default_config.go (1)
Config(11-11)src/internal/ui/rendering/constants.go (2)
MinWidthForBorder(22-22)MinHeightForBorder(23-23)
⏰ 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: Cloudflare Pages
🔇 Additional comments (9)
src/internal/default_config.go (1)
21-29: Comment block aligns well with PR objectives.The TODO and API design notes document the need to parameterize preview initialization (thumbnail generator, image previewer) for test isolation, which matches the PR's intent to disable file preview in tests and prevent noise in test logs. This addresses concerns from prior issues around ImagePreviewer lifecycle management.
src/pkg/file_preview/thumbnail_generator.go (1)
121-133: LGTM! Appropriate logging level adjustment.Downgrading to debug-level logging for missing external tools (poppler and ffmpeg) is appropriate since these are optional dependencies. The application continues to function without thumbnail generation for PDFs and videos, so these are not error conditions.
src/internal/ui/preview/model.go (1)
34-46: Good fix for batCmd initialization.The addition of
batCmd: checkBatCmd()properly initializes the bat command during model creation, addressing initialization issues from PR #1021. The explicit setting ofopen: common.Config.DefaultOpenFilePreviewalso improves clarity.The TODO comments document valid concerns about initialization timing and test overhead, but the current approach is functional and correct.
Based on learnings, the previous PR #1021 had issues with batCmd initialization moving from global to per-instance. This change ensures proper initialization at construction time.
src/internal/ui/sidebar/pinned.go (1)
17-25: JSON file initialization approach is reasonable.The addition of
utils.InitJSONFile(filePath)centralizes JSON file initialization at the point of use, replacing previous startup initialization. The error is logged but doesn't prevent manager creation, which is intentional and consistent with the graceful degradation pattern throughout the manager.The
Load()method handles missing or unreadable files by returning an empty array, andInitJSONFileonly fails during the initial file creation (which would produce the same permission/disk errors thatSave()would encounter anyway). Logging the error provides debugging visibility while allowing the application to continue running with an empty pinned directories list.src/internal/model_layout_test.go (2)
24-27: LGTM! Good addition of short mode skip.The short mode skip is appropriately added for this comprehensive test suite with 800+ test cases, allowing developers to run quick smoke tests via
go test -short.
90-90: LGTM! Test helper update aligns with file preview parameterization.The switch to
defaultTestModelWithFooterAndFilePreviewis consistent with the PR's test refactoring to support file preview scenarios.src/internal/model_test.go (1)
315-315: LGTM! Correct test helper for async preview testing.The use of
defaultTestModelWithFilePreviewis appropriate for this test that validates asynchronous file preview synchronization behavior.src/internal/ui/rendering/renderer.go (1)
156-156: LGTM! Good refactoring to use named constants.Replacing magic numbers with
MinWidthForBorderandMinHeightForBorderimproves code maintainability and ensures consistency with the border rendering logic inspf_renderers.go.src/internal/utils/file_utils.go (1)
284-291: LGTM! Well-implemented JSON file initialization.The function correctly initializes a JSON file with "null" content, uses appropriate file permissions, and provides good error context.
The error handling pattern in the pinned file manager is intentional and well-designed: initialization failures are logged but don't break control flow, as
Load()gracefully handles missing files (returning an empty slice) whileSave()can create the file if needed. Critical operations likeToggle()properly propagate errors to callers.
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [yorukot/superfile](https://github.com/yorukot/superfile) | minor | `v1.4.0` → `v1.5.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.5.0`](https://github.com/yorukot/superfile/releases/tag/v1.5.0) [Compare Source](yorukot/superfile@v1.4.0...v1.5.0) This release brings major new features, including video and PDF preview support, multi-column file panels, and configurable navigation, alongside significant code refactoring and comprehensive bug fixes. #### Install: [**Click me to know how to install**](https://github.com/yorukot/superfile?tab=readme-ov-file#installation) #### Highlights - Added video and PDF preview support via loading the first frame/page as an image. Thanks [@​Yassen-Higazi](https://github.com/Yassen-Higazi) for the implementation <details><summary>Screenshots</summary> <p> <img width="951" height="596" alt="image" src="https://github.com/user-attachments/assets/6edfa9c2-ebcd-4622-a115-f71fa533b3e1" /> <img width="949" height="594" alt="image" src="https://github.com/user-attachments/assets/8d15fa46-5178-422d-8eea-455cac31fdd0" /> </p> </details> - Multi-column file panel view with date/size/permission columns. Thanks [@​xelavopelk](https://github.com/xelavopelk) for the implementation <details><summary>Screenshots</summary> <p> <img width="420" height="264" alt="image" src="https://github.com/user-attachments/assets/e172f1e8-c2a5-42d2-8eeb-62e721f61a4f" /> </p> </details> - Configurable fast navigation in the Filepanel. See this MR for more details: [#​1220](yorukot/superfile#1220) - You can now configure `spf` to open files with specific extensions with your choice of editor application. Thanks [@​litvinov-git](https://github.com/litvinov-git) for the implementation See this MR for more details: [#​1197](yorukot/superfile#1197) - Terminal stdout support for shell commands - Allow launching with the filename. `spf /a/b/c.txt` will launch in `/a/b` with `c.txt` as the selected file. - Various bug fixes, including modal confirmations, layout issues, and race conditions. See 'Detailed Change Summary' ##### Internal Updates - Separated FilePanel and FileModel into a dedicated package for better code organization - Comprehensive end-to-end testing with layout fixes - Enhanced dimension validation and sidebar fixes - Updated multiple dependencies including Astro, Go toolchain, and linters - Added gosec linter and MND linter with magic number cleanup #### Detailed Change Summary <details><summary>Details</summary> <p> ##### Update - allow hover to file [`#1177`](yorukot/superfile#1177) by @​lazysegtree - show count selected items in select mode [`#1187`](yorukot/superfile#1187) by @​xelavopelk - Add icon alias for kts to kt [`#1153`](yorukot/superfile#1153) by @​nicolaic - link icon and metadata [`#1171`](yorukot/superfile#1171) by @​xelavopelk - user configuration of editors by file extension [`#1197`](yorukot/superfile#1197) by @​litvinov-git - add video preview support [`#1178`](yorukot/superfile#1178) by @​Yassen-Higazi - Add pdf preview support [`#1198`](yorukot/superfile#1198) by @​Yassen-Higazi - Add icons in pinned directories [`#1215`](yorukot/superfile#1215) by @​lazysegtree - Enable fast configurable navigation [`#1220`](yorukot/superfile#1220) by @​lazysegtree - add Trash bin to default directories for Linux [`#1236`](yorukot/superfile#1236) by @​lazysegtree - add terminal stdout support for shell commands [`#1250`](yorukot/superfile#1250) by @​majiayu000 - More columns in file panel (MVP) [`#1268`](yorukot/superfile#1268) by @​xelavopelk ##### Bug Fix - only calculate checksum on files [`#1119`](yorukot/superfile#1119) by @​nikero41 - Linter issue with PrintfAndExit [`#1133`](yorukot/superfile#1133) by @​xelavopelk - Remove repeated os.ReadDir calls [`#1155`](yorukot/superfile#1155) by @​lazysegtree - Disable COPYFILE in macOS [`#1194`](yorukot/superfile#1194) by @​lazysegtree - add missing hotkeys to help menu [`#1192`](yorukot/superfile#1192) by @​lazysegtree - Fetch latest version automatically [`#1127`](yorukot/superfile#1127) by @​lazysegtree - Use async methods to prevent test race conditions [`#1201`](yorukot/superfile#1201) by @​lazysegtree - update metadata and process bar sizes when toggling footer [`#1218`](yorukot/superfile#1218) by @​lazysegtree - File panel dimension management [`#1222`](yorukot/superfile#1222) by @​lazysegtree - Layout fixes with full end-to-end tests [`#1227`](yorukot/superfile#1227) by @​lazysegtree - Fix flaky tests [`#1233`](yorukot/superfile#1233) by @​lazysegtree - modal confirmation bug with arrow keys [`#1243`](yorukot/superfile#1243) by @​lazysegtree - small file panel optimization [`#1241`](yorukot/superfile#1241) by @​xelavopelk - use ExtractOperationMsg for extraction [`#1248`](yorukot/superfile#1248) by @​lazysegtree - skip open_with from missing field validation [`#1251`](yorukot/superfile#1251) by @​lazysegtree - border height validation fixes [`#1267`](yorukot/superfile#1267) by @​lazysegtree - fix case with two active panes [`#1271`](yorukot/superfile#1271) by @​xelavopelk - help model formatting [`#1277`](yorukot/superfile#1277) by @​booth-w ##### Optimization - simplify renameIfDuplicate logic [`#1100`](yorukot/superfile#1100) by @​sarff - separate FilePanel into dedicated package [`#1195`](yorukot/superfile#1195) by @​lazysegtree - File model separation [`#1223`](yorukot/superfile#1223) by @​lazysegtree - Dimension validations [`#1224`](yorukot/superfile#1224) by @​lazysegtree - layout validation and sidebar dimension fixes [`#1228`](yorukot/superfile#1228) by @​lazysegtree - user rendering package and removal of unused preview code [`#1245`](yorukot/superfile#1245) by @​lazysegtree - user rendering package for file preview [`#1249`](yorukot/superfile#1249) by @​lazysegtree ##### Documentation - update Fish shell setup docs [`#1142`](yorukot/superfile#1142) by @​wleoncio - fix macOS typo [`#1212`](yorukot/superfile#1212) by @​wcbing - stylistic and linguistic cleanup of config documentation [`#1184`](yorukot/superfile#1184) by @​ninetailedtori ##### Dependencies - update astro monorepo [`#1010`](yorukot/superfile#1010) by @​renovate[bot] - update starlight-giscus [`#1020`](yorukot/superfile#1020) by @​renovate[bot] - bump astro versions [`#1138`](yorukot/superfile#1138), [`#1157`](yorukot/superfile#1157), [`#1158`](yorukot/superfile#1158) by @​dependabot[bot], @​renovate[bot] - bump vite [`#1134`](yorukot/superfile#1134) by @​dependabot[bot] - update setup-go action [`#1038`](yorukot/superfile#1038) by @​renovate[bot] - update expressive-code plugins [`#1189`](yorukot/superfile#1189), [`#1246`](yorukot/superfile#1246) by @​renovate[bot] - update sharp [`#1256`](yorukot/superfile#1256) by @​renovate[bot] - update fontsource monorepo [`#1257`](yorukot/superfile#1257) by @​renovate[bot] - update urfave/cli [`#1136`](yorukot/superfile#1136), [`#1190`](yorukot/superfile#1190) by @​renovate[bot] - update astro / starlight / ansi / toolchain deps [`#1275`](yorukot/superfile#1275), [`#1278`](yorukot/superfile#1278), [`#1280`](yorukot/superfile#1280) by @​renovate[bot] - update python and go versions [`#1276`](yorukot/superfile#1276), [`#1191`](yorukot/superfile#1191) by @​renovate[bot] - update golangci-lint action [`#1286`](yorukot/superfile#1286) by @​renovate[bot] ##### Misc - update CI input names [`#1120`](yorukot/superfile#1120) by @​nikero41 - Everforest Dark Hard theme [`#1114`](yorukot/superfile#1114) by @​fzahner - migrate tutorial demo assets to local [`#1140`](yorukot/superfile#1140) by @​yorukot - new logo asset [`#1145`](yorukot/superfile#1145) by @​nonepork - mirror repository to codeberg [`#1141`](yorukot/superfile#1141) by @​yorukot - sync package lock [`#1143`](yorukot/superfile#1143) by @​yorukot - bump golangci-lint version [`#1135`](yorukot/superfile#1135) by @​lazysegtree - add gosec linter [`#1185`](yorukot/superfile#1185) by @​lazysegtree - enable MND linter and clean magic numbers [`#1180`](yorukot/superfile#1180) by @​lazysegtree - skip permission tests when running as root [`#1186`](yorukot/superfile#1186) by @​lazysegtree - release v1.4.1-rc [`#1203`](yorukot/superfile#1203) by @​lazysegtree - 1.5.0-rc1 housekeeping changes [`#1264`](yorukot/superfile#1264) by @​lazysegtree </p> </details> #### New Contributors * @​fzahner made their first contribution in yorukot/superfile#1114 * @​sarff made their first contribution in yorukot/superfile#1100 * @​nicolaic made their first contribution in yorukot/superfile#1153 * @​Yassen-Higazi made their first contribution in yorukot/superfile#1178 * @​ninetailedtori made their first contribution in yorukot/superfile#1184 * @​litvinov-git made their first contribution in yorukot/superfile#1197 * @​wcbing made their first contribution in yorukot/superfile#1212 * @​majiayu000 made their first contribution in yorukot/superfile#1250 **Full Changelog**: <yorukot/superfile@v1.4.0...v1.5.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:eyJjcmVhdGVkSW5WZXIiOiI0Mi44MC4xIiwidXBkYXRlZEluVmVyIjoiNDIuODAuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90IiwiYXV0b21hdGlvbjpib3QtYXV0aG9yZWQiLCJkZXBlbmRlbmN5LXR5cGU6Om1pbm9yIl19-->
Summary by CodeRabbit
Bug Fixes
Chores
✏️ Tip: You can customize this high-level summary in your review settings.