Skip to content

Conversation

@yorukot
Copy link
Owner

@yorukot yorukot commented Jun 28, 2025

Issue: #888

Summary by CodeRabbit

  • Style
    • Standardized comment formatting by updating all instances of "Todo" to "TODO" across the codebase and configuration files for consistency. No changes to functionality or logic were made.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jun 28, 2025

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

💤 Files selected but had no reviewable changes (8)
  • src/internal/backend/README.md
  • src/internal/common/README.md
  • src/internal/ui/README.md
  • src/internal/ui/prompt/README.md
  • src/internal/ui/rendering/README.md
  • src/internal/ui/sidebar/README.md
  • src/internal/utils/README.md
  • testsuite/README.md

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

This change standardizes comment annotations across the codebase by updating all instances of "Todo" to the conventional uppercase "TODO". The updates affect source, configuration, and test files, but do not alter any functional logic, control flow, or exported entities. All modifications are purely stylistic and for consistency.

Changes

File(s) Change Summary
.golangci.yaml Updated comment annotations from "Todo" to "TODO" for consistency in linter configuration comments.
src/internal/common/predefined_variable.go
src/internal/common/string_function.go
src/internal/common/style_function.go
Corrected "Todo" to "TODO" in comments for style consistency.
src/internal/config_function.go
src/internal/function.go
src/internal/handle_file_operations.go
Standardized comment style from "Todo" to "TODO" in multiple function comments.
src/internal/handle_file_operation_test.go
src/internal/handle_panel_movement.go
src/internal/handle_panel_navigation.go
src/internal/handle_panel_up_down.go
src/internal/handle_panel_up_down_test.go
Updated "Todo" to "TODO" in comments in test and panel-related files.
src/internal/key_function.go
src/internal/model.go
src/internal/model_file_operations_test.go
src/internal/model_prompt_test.go
src/internal/model_render.go
src/internal/test_utils.go
src/internal/type.go
src/internal/type_utils.go
Corrected comment capitalization from "Todo" to "TODO" in model, utility, and type files.
src/internal/ui/sidebar/disk_utils.go
src/internal/ui/sidebar/render.go
src/internal/ui/sidebar/utils.go
src/internal/ui/sidebar/utils_test.go
Standardized TODO comment formatting in sidebar UI files.
src/internal/utils/fzf_utils.go Corrected "Todo" to "TODO" in a comment regarding blocking channel receive.
testsuite/core/base_test.py Updated comment prefix from "# Todo" to "# TODO" in test initialization.

Suggested reviewers

  • lazysegtree

Poem

A rabbit with a coder's heart
Hopped through files to do its part—
"Todo," it cried, "let’s fix your case,
To 'TODO' you’ll go, with style and grace!"
Now comments shine, all neat and bright,
Consistency brings us code delight!
🐇✨


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.
    • Explain this complex logic.
    • 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. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • 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 src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

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

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

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

Documentation and Community

  • 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
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: 0

🧹 Nitpick comments (12)
testsuite/core/base_test.py (1)

62-63: Polish TODO wording & punctuation

Minor readability nit:

-        # TODO fix it : For now first keypress in not being registered, 
+        # TODO: Fix – for now the first key-press is not being registered,

• Keeps the “TODO:” marker consistent with the rest of the codebase (no space before the colon).
• Fixes the grammar (“is not” instead of “in not”) and trims the trailing comma.

Nothing functional, just comment hygiene.

src/internal/type.go (1)

89-92: Unify “TODO:” style

The surrounding files now use // TODO: (no space before the colon). Consider the same here for absolute consistency:

-// TODO : We could consider using *model as tea.Model, instead of model.
+// TODO: We could consider using *model as tea.Model instead of model.

Purely stylistic – feel free to ignore if your chosen house-style intentionally keeps the space.

src/internal/handle_panel_up_down_test.go (1)

329-329: Consistent TODO marker

Same style nit as above – drop the space after TODO:

-// TODO : Write tests for File Panel pgUp and pgDown and itemSelectUp/itemSelectDown
+// TODO: Write tests for File-panel pgUp/pgDown and itemSelectUp/itemSelectDown

(Also optional: hyphenate “File-panel” and trim duplication.)

src/internal/key_function.go (1)

215-216: Tighten TODO & fix typo

-// TODO : There is a lot of duplication for these models, each one of them has to handle
-// ConfirmTyping and CancleTyping in a similar way. There is a scope of some good refactoring here.
+// TODO: There is a lot of duplication for these models; each handles
+// ConfirmTyping and CancelTyping in a similar way. Worth refactoring.

• Removes extra space after TODO.
• Corrects “CancleTyping” → “CancelTyping”.
Purely comment-level.

src/internal/test_utils.go (1)

70-71: Align with chosen TODO format

-// TODO : Consider wrapping TeaUpdate with a helper that both forwards the return
+// TODO: Consider wrapping TeaUpdate with a helper that both forwards the return

No functional impact – just keeps the colon placement uniform.

src/internal/ui/sidebar/render.go (1)

46-47: Drop the extra space before the colon in the TODO label

For consistency with the rest of the repo (// TODO:), remove the space:

-	// TODO : This is not true when searchbar is not rendered(totalHeight is 2, not 3),
+	// TODO: This is not true when searchbar is not rendered(totalHeight is 2, not 3),
src/internal/ui/sidebar/utils_test.go (1)

22-26: Align TODO comment style with repo convention

All other TODOs use the // TODO: form. Fix the three occurrences here:

-// TODO : Use t.Run(tt.name
+// TODO: Use t.Run(tt.name

-// TODO : Get rid of global vars, use testdata in each test, even if there is a bit of
+// TODO: Get rid of global vars, use testdata in each test, even if there is a bit of

-// TODO : Add tt.names
+// TODO: Add tt.names
src/internal/common/string_function.go (2)

55-56: Consistent TODO label

-	// TODO : Use ansi.Substring to correctly handle ANSI escape codes
+	// TODO: Use ansi.Substring to correctly handle ANSI escape codes

117-118: Consistent TODO label

-	// TODO : Remove duplication here
+	// TODO: Remove duplication here
.golangci.yaml (1)

272-349: Unify comment prefix to # TODO:

Several newly-touched lines still use # TODO … without the colon.
Search/replace within this block for consistency and easier tooling:

-    # TODO enable this - This needs a fix in few of our functions
+    # TODO: enable this - This needs a fix in few of our functions
...
-    # TODO enable - need to make functions shorter
+    # TODO: enable - need to make functions shorter
...
-    # TODO enable - This is too much for us right now
+    # TODO: enable - This is too much for us right now
...
-    # TODO enable - Need to refactor many functions
+    # TODO: enable - Need to refactor many functions
...
-    # TODO enable
+    # TODO: enable
...
-    # TODO enable - ignore for a few int overflow, and fix file permissions
+    # TODO: enable - ignore for a few int overflow, and fix file permissions
...
-    # TODO enable : Need many fixes
+    # TODO: enable : Need many fixes
...
-    # TODO enable - Many many magic numbers, and this should be fixed.
+    # TODO: enable - Many many magic numbers, and this should be fixed.
...
-    # TODO enable - Issue due to model struct
+    # TODO: enable - Issue due to model struct
...
-    # TODO enable - Need to use non-root logger
+    # TODO: enable - Need to use non-root logger
...
-    ## TODO : Enable some of them
+    ## TODO: Enable some of them
src/internal/handle_panel_movement.go (2)

173-174: Tiny style fix in TODO

-			// TODO : (performance)convert panel.selected to a set (map[string]struct{})
+			// TODO: (performance) convert panel.selected to a set (map[string]struct{})

198-200: Tiny style fix in TODO

-	// TODO : Revisit this. Is this really need here, is this correct ?
+	// TODO: Revisit this. Is this really needed here, is this correct?
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 98ba124 and 4b60153.

📒 Files selected for processing (26)
  • .golangci.yaml (4 hunks)
  • src/internal/common/predefined_variable.go (2 hunks)
  • src/internal/common/string_function.go (2 hunks)
  • src/internal/common/style_function.go (1 hunks)
  • src/internal/config_function.go (1 hunks)
  • src/internal/function.go (7 hunks)
  • src/internal/handle_file_operation_test.go (2 hunks)
  • src/internal/handle_file_operations.go (6 hunks)
  • src/internal/handle_panel_movement.go (2 hunks)
  • src/internal/handle_panel_navigation.go (1 hunks)
  • src/internal/handle_panel_up_down.go (1 hunks)
  • src/internal/handle_panel_up_down_test.go (1 hunks)
  • src/internal/key_function.go (1 hunks)
  • src/internal/model.go (6 hunks)
  • src/internal/model_file_operations_test.go (5 hunks)
  • src/internal/model_prompt_test.go (1 hunks)
  • src/internal/model_render.go (17 hunks)
  • src/internal/test_utils.go (1 hunks)
  • src/internal/type.go (1 hunks)
  • src/internal/type_utils.go (1 hunks)
  • src/internal/ui/sidebar/disk_utils.go (2 hunks)
  • src/internal/ui/sidebar/render.go (1 hunks)
  • src/internal/ui/sidebar/utils.go (1 hunks)
  • src/internal/ui/sidebar/utils_test.go (1 hunks)
  • src/internal/utils/fzf_utils.go (1 hunks)
  • testsuite/core/base_test.py (1 hunks)
🧰 Additional context used
🧠 Learnings (25)
📓 Common learnings
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#825
File: src/internal/model_render_test.go:15-25
Timestamp: 2025-05-22T04:53:45.663Z
Learning: In the superfile project, comments in test files documenting additional test cases with "// Additional tests" are intentional TODOs for future work and should not be flagged as missing implementations in PR reviews.
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: yorukot
PR: yorukot/superfile#887
File: src/internal/key_function.go:258-263
Timestamp: 2025-06-16T14:14:39.966Z
Learning: In the superfile codebase, yorukot prefers to maintain consistent code structure patterns (like using switch statements in key handling functions) even when it triggers linter warnings, prioritizing code consistency and future extensibility over linter compliance.
src/internal/common/style_function.go (6)
Learnt from: lazysegtree
PR: yorukot/superfile#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.
Learnt from: lazysegtree
PR: yorukot/superfile#825
File: src/internal/model_render_test.go:15-25
Timestamp: 2025-05-22T04:53:45.663Z
Learning: In the superfile project, comments in test files documenting additional test cases with "// Additional tests" are intentional TODOs for future work and should not be flagged as missing implementations in PR reviews.
Learnt from: lazysegtree
PR: yorukot/superfile#770
File: src/internal/ui/sidebar/render.go:45-45
Timestamp: 2025-04-12T14:01:13.080Z
Learning: In Go, identifiers should remain unexported (lowercase) when they're only used within their own package, even if other similar identifiers are exported. Exported (capitalized) identifiers should only be used when the element needs to be accessible from outside its package.
Learnt from: yorukot
PR: yorukot/superfile#841
File: src/internal/model_render.go:334-334
Timestamp: 2025-06-04T09:58:25.572Z
Learning: Before suggesting the creation of new constants for string literals, always check if a constant already exists in the codebase, especially in common packages like `src/internal/common/predefined_variable.go`.
Learnt from: lazysegtree
PR: yorukot/superfile#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.
Learnt from: lazysegtree
PR: yorukot/superfile#775
File: src/internal/common/style_function.go:240-243
Timestamp: 2025-04-27T17:04:47.888Z
Learning: lazysegtree plans to refactor textinput.Model creation in the future to fix the code duplication issue that caused a bug where the sidebar search model was created without setting the Width property.
src/internal/config_function.go (5)
Learnt from: lazysegtree
PR: yorukot/superfile#881
File: src/internal/utils/file_utils.go:0-0
Timestamp: 2025-06-27T02:36:23.457Z
Learning: In superfile's LoadTomlFile function refactoring, the preferred approach is to return structured errors (TomlLoadError) rather than using PrintfAndExit for all error conditions. This allows callers to decide appropriate error handling: fatal errors cause immediate exit, while non-fatal errors (like missing fields when not fixing) only print warnings and continue.
Learnt from: lazysegtree
PR: yorukot/superfile#881
File: src/internal/utils/file_utils.go:104-104
Timestamp: 2025-06-24T03:17:11.949Z
Learning: In superfile's LoadTomlFile function, error handling should follow this pattern: use PrintfAndExit for critical errors that prevent application functionality (config corruption, file system failures during fixing), and use fmt.Println with errorPrefix for non-critical errors that users should see but can continue from (missing fields when not fixing, cleanup warnings).
Learnt from: lazysegtree
PR: yorukot/superfile#881
File: src/internal/utils/file_utils.go:104-104
Timestamp: 2025-06-24T03:15:57.379Z
Learning: In superfile's LoadTomlFile function, all errors should use fmt.Print with errorPrefix instead of slog.Error, because these are critical config loading errors that users must see immediately on their terminal with proper styling. slog.Error would either go to log files (if configured) or show escaped ANSI codes, making errors less visible to users during startup.
Learnt from: lazysegtree
PR: yorukot/superfile#881
File: src/internal/utils/file_utils.go:104-104
Timestamp: 2025-06-24T03:11:07.797Z
Learning: In superfile, during the initial config loading phase (LoadTomlFile calls), slog redirection to log files hasn't been set up yet, so slog.Error messages still go to stdout/stderr and should include errorPrefix for proper terminal styling.
Learnt from: lazysegtree
PR: yorukot/superfile#821
File: src/internal/file_operations_compress.go:0-0
Timestamp: 2025-06-05T12:42:45.139Z
Learning: Pattern to watch for: defer file.Close() inside loops (for, range, filepath.Walk callbacks) causes resource leaks by accumulating file descriptors until function exits. Should be replaced with explicit Close() calls immediately after file operations with proper error handling.
src/internal/ui/sidebar/utils.go (5)
Learnt from: lazysegtree
PR: yorukot/superfile#770
File: src/internal/ui/sidebar/consts.go:10-13
Timestamp: 2025-04-12T14:00:49.244Z
Learning: In the sidebar package, variables like `pinnedDividerDir` and `diskDividerDir` should remain unexported as they're only used within the package, even though their struct fields are exported with PascalCase (Name, Location) for JSON serialization purposes.
Learnt from: lazysegtree
PR: yorukot/superfile#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.
Learnt from: lazysegtree
PR: yorukot/superfile#770
File: src/internal/ui/sidebar/render.go:0-0
Timestamp: 2025-04-12T13:51:24.691Z
Learning: In the sidebar component of yorukot/superfile, the partial list rendering in render.go is intentional. The sidebar implements scrolling functionality where ListUp/ListDown methods in navigation.go update cursor position and renderIndex to show the appropriate portion of the directory list based on available space.
Learnt from: lazysegtree
PR: yorukot/superfile#770
File: src/internal/ui/sidebar/render.go:0-0
Timestamp: 2025-04-12T13:51:24.691Z
Learning: In the sidebar component of yorukot/superfile, the partial list rendering in render.go is intentional. The sidebar implements scrolling functionality where ListUp/ListDown methods in navigation.go update cursor position and renderIndex to show the appropriate portion of the directory list based on available space.
Learnt from: lazysegtree
PR: yorukot/superfile#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.
testsuite/core/base_test.py (1)
Learnt from: lazysegtree
PR: yorukot/superfile#825
File: src/internal/model_render_test.go:15-25
Timestamp: 2025-05-22T04:53:45.663Z
Learning: In the superfile project, comments in test files documenting additional test cases with "// Additional tests" are intentional TODOs for future work and should not be flagged as missing implementations in PR reviews.
src/internal/type.go (1)
Learnt from: lazysegtree
PR: yorukot/superfile#825
File: src/internal/model_render_test.go:15-25
Timestamp: 2025-05-22T04:53:45.663Z
Learning: In the superfile project, comments in test files documenting additional test cases with "// Additional tests" are intentional TODOs for future work and should not be flagged as missing implementations in PR reviews.
src/internal/type_utils.go (1)
Learnt from: lazysegtree
PR: yorukot/superfile#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.
src/internal/ui/sidebar/disk_utils.go (5)
Learnt from: lazysegtree
PR: yorukot/superfile#770
File: src/internal/ui/sidebar/consts.go:10-13
Timestamp: 2025-04-12T14:00:49.244Z
Learning: In the sidebar package, variables like `pinnedDividerDir` and `diskDividerDir` should remain unexported as they're only used within the package, even though their struct fields are exported with PascalCase (Name, Location) for JSON serialization purposes.
Learnt from: lazysegtree
PR: yorukot/superfile#770
File: src/internal/ui/sidebar/render.go:0-0
Timestamp: 2025-04-12T13:51:24.691Z
Learning: In the sidebar component of yorukot/superfile, the partial list rendering in render.go is intentional. The sidebar implements scrolling functionality where ListUp/ListDown methods in navigation.go update cursor position and renderIndex to show the appropriate portion of the directory list based on available space.
Learnt from: lazysegtree
PR: yorukot/superfile#770
File: src/internal/ui/sidebar/render.go:0-0
Timestamp: 2025-04-12T13:51:24.691Z
Learning: In the sidebar component of yorukot/superfile, the partial list rendering in render.go is intentional. The sidebar implements scrolling functionality where ListUp/ListDown methods in navigation.go update cursor position and renderIndex to show the appropriate portion of the directory list based on available space.
Learnt from: lazysegtree
PR: yorukot/superfile#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.
Learnt from: lazysegtree
PR: yorukot/superfile#825
File: src/internal/model_render_test.go:15-25
Timestamp: 2025-05-22T04:53:45.663Z
Learning: In the superfile project, comments in test files documenting additional test cases with "// Additional tests" are intentional TODOs for future work and should not be flagged as missing implementations in PR reviews.
src/internal/handle_panel_up_down.go (2)
Learnt from: lazysegtree
PR: yorukot/superfile#770
File: src/internal/ui/sidebar/render.go:0-0
Timestamp: 2025-04-12T13:51:24.691Z
Learning: In the sidebar component of yorukot/superfile, the partial list rendering in render.go is intentional. The sidebar implements scrolling functionality where ListUp/ListDown methods in navigation.go update cursor position and renderIndex to show the appropriate portion of the directory list based on available space.
Learnt from: lazysegtree
PR: yorukot/superfile#770
File: src/internal/ui/sidebar/render.go:0-0
Timestamp: 2025-04-12T13:51:24.691Z
Learning: In the sidebar component of yorukot/superfile, the partial list rendering in render.go is intentional. The sidebar implements scrolling functionality where ListUp/ListDown methods in navigation.go update cursor position and renderIndex to show the appropriate portion of the directory list based on available space.
src/internal/model_prompt_test.go (1)
Learnt from: lazysegtree
PR: yorukot/superfile#825
File: src/internal/model_render_test.go:15-25
Timestamp: 2025-05-22T04:53:45.663Z
Learning: In the superfile project, comments in test files documenting additional test cases with "// Additional tests" are intentional TODOs for future work and should not be flagged as missing implementations in PR reviews.
src/internal/handle_panel_up_down_test.go (5)
Learnt from: lazysegtree
PR: yorukot/superfile#825
File: src/internal/model_render_test.go:15-25
Timestamp: 2025-05-22T04:53:45.663Z
Learning: In the superfile project, comments in test files documenting additional test cases with "// Additional tests" are intentional TODOs for future work and should not be flagged as missing implementations in PR reviews.
Learnt from: lazysegtree
PR: yorukot/superfile#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 }`.
Learnt from: lazysegtree
PR: yorukot/superfile#770
File: src/internal/ui/sidebar/render.go:0-0
Timestamp: 2025-04-12T13:51:24.691Z
Learning: In the sidebar component of yorukot/superfile, the partial list rendering in render.go is intentional. The sidebar implements scrolling functionality where ListUp/ListDown methods in navigation.go update cursor position and renderIndex to show the appropriate portion of the directory list based on available space.
Learnt from: lazysegtree
PR: yorukot/superfile#770
File: src/internal/ui/sidebar/render.go:0-0
Timestamp: 2025-04-12T13:51:24.691Z
Learning: In the sidebar component of yorukot/superfile, the partial list rendering in render.go is intentional. The sidebar implements scrolling functionality where ListUp/ListDown methods in navigation.go update cursor position and renderIndex to show the appropriate portion of the directory list based on available space.
Learnt from: lazysegtree
PR: yorukot/superfile#730
File: src/internal/model_render.go:653-654
Timestamp: 2025-03-29T10:02:04.260Z
Learning: A panel validation function should be implemented to ensure panel.cursor doesn't become negative or go out of bounds, but this should be addressed in a separate PR - not as part of the PR fixing crashes when opening files with the editor on an empty panel.
src/internal/common/predefined_variable.go (6)
Learnt from: yorukot
PR: yorukot/superfile#841
File: src/internal/model_render.go:334-334
Timestamp: 2025-06-04T09:58:25.572Z
Learning: Before suggesting the creation of new constants for string literals, always check if a constant already exists in the codebase, especially in common packages like `src/internal/common/predefined_variable.go`.
Learnt from: lazysegtree
PR: yorukot/superfile#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.
Learnt from: lazysegtree
PR: yorukot/superfile#770
File: src/internal/ui/sidebar/render.go:45-45
Timestamp: 2025-04-12T14:01:13.080Z
Learning: In Go, identifiers should remain unexported (lowercase) when they're only used within their own package, even if other similar identifiers are exported. Exported (capitalized) identifiers should only be used when the element needs to be accessible from outside its package.
Learnt from: lazysegtree
PR: yorukot/superfile#825
File: src/internal/model_render_test.go:15-25
Timestamp: 2025-05-22T04:53:45.663Z
Learning: In the superfile project, comments in test files documenting additional test cases with "// Additional tests" are intentional TODOs for future work and should not be flagged as missing implementations in PR reviews.
Learnt from: lazysegtree
PR: yorukot/superfile#770
File: src/internal/ui/sidebar/consts.go:5-8
Timestamp: 2025-04-12T14:00:54.846Z
Learning: In the superfile codebase, structs that need to be serialized to/from JSON have exported fields (capitalized names like `Name` and `Location`) even when the variables of those structs are unexported. This is because Go's JSON marshaling/unmarshaling can only access exported struct fields.
Learnt from: lazysegtree
PR: yorukot/superfile#825
File: src/internal/model_render.go:0-0
Timestamp: 2025-05-22T04:50:02.071Z
Learning: The project standardized on using one ANSI package import (github.com/charmbracelet/x/exp/term/ansi) to avoid binary bloat and potential incompatibilities.
src/internal/test_utils.go (1)
Learnt from: lazysegtree
PR: yorukot/superfile#825
File: src/internal/model_render_test.go:15-25
Timestamp: 2025-05-22T04:53:45.663Z
Learning: In the superfile project, comments in test files documenting additional test cases with "// Additional tests" are intentional TODOs for future work and should not be flagged as missing implementations in PR reviews.
src/internal/handle_panel_navigation.go (4)
Learnt from: lazysegtree
PR: yorukot/superfile#730
File: src/internal/model_render.go:653-654
Timestamp: 2025-03-29T10:02:04.260Z
Learning: A panel validation function should be implemented to ensure panel.cursor doesn't become negative or go out of bounds, but this should be addressed in a separate PR - not as part of the PR fixing crashes when opening files with the editor on an empty panel.
Learnt from: lazysegtree
PR: yorukot/superfile#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 }`.
Learnt from: lazysegtree
PR: yorukot/superfile#825
File: src/internal/model_render_test.go:15-25
Timestamp: 2025-05-22T04:53:45.663Z
Learning: In the superfile project, comments in test files documenting additional test cases with "// Additional tests" are intentional TODOs for future work and should not be flagged as missing implementations in PR reviews.
Learnt from: lazysegtree
PR: yorukot/superfile#821
File: src/internal/file_operations_compress.go:0-0
Timestamp: 2025-06-05T12:42:45.139Z
Learning: Pattern to watch for: defer file.Close() inside loops (for, range, filepath.Walk callbacks) causes resource leaks by accumulating file descriptors until function exits. Should be replaced with explicit Close() calls immediately after file operations with proper error handling.
src/internal/model_file_operations_test.go (2)
Learnt from: lazysegtree
PR: yorukot/superfile#825
File: src/internal/model_render_test.go:15-25
Timestamp: 2025-05-22T04:53:45.663Z
Learning: In the superfile project, comments in test files documenting additional test cases with "// Additional tests" are intentional TODOs for future work and should not be flagged as missing implementations in PR reviews.
Learnt from: lazysegtree
PR: yorukot/superfile#821
File: src/internal/file_operations_compress.go:0-0
Timestamp: 2025-06-05T12:42:45.139Z
Learning: Pattern to watch for: defer file.Close() inside loops (for, range, filepath.Walk callbacks) causes resource leaks by accumulating file descriptors until function exits. Should be replaced with explicit Close() calls immediately after file operations with proper error handling.
.golangci.yaml (2)
Learnt from: lazysegtree
PR: yorukot/superfile#825
File: src/internal/model_render_test.go:15-25
Timestamp: 2025-05-22T04:53:45.663Z
Learning: In the superfile project, comments in test files documenting additional test cases with "// Additional tests" are intentional TODOs for future work and should not be flagged as missing implementations in PR reviews.
Learnt from: lazysegtree
PR: yorukot/superfile#821
File: src/internal/file_operations_compress.go:0-0
Timestamp: 2025-06-05T12:42:45.139Z
Learning: Pattern to watch for: defer file.Close() inside loops (for, range, filepath.Walk callbacks) causes resource leaks by accumulating file descriptors until function exits. Should be replaced with explicit Close() calls immediately after file operations with proper error handling.
src/internal/handle_file_operation_test.go (1)
Learnt from: lazysegtree
PR: yorukot/superfile#825
File: src/internal/model_render_test.go:15-25
Timestamp: 2025-05-22T04:53:45.663Z
Learning: In the superfile project, comments in test files documenting additional test cases with "// Additional tests" are intentional TODOs for future work and should not be flagged as missing implementations in PR reviews.
src/internal/ui/sidebar/utils_test.go (6)
Learnt from: lazysegtree
PR: yorukot/superfile#825
File: src/internal/model_render_test.go:15-25
Timestamp: 2025-05-22T04:53:45.663Z
Learning: In the superfile project, comments in test files documenting additional test cases with "// Additional tests" are intentional TODOs for future work and should not be flagged as missing implementations in PR reviews.
Learnt from: lazysegtree
PR: yorukot/superfile#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.
Learnt from: lazysegtree
PR: yorukot/superfile#770
File: src/internal/ui/sidebar/consts.go:10-13
Timestamp: 2025-04-12T14:00:49.244Z
Learning: In the sidebar package, variables like `pinnedDividerDir` and `diskDividerDir` should remain unexported as they're only used within the package, even though their struct fields are exported with PascalCase (Name, Location) for JSON serialization purposes.
Learnt from: lazysegtree
PR: yorukot/superfile#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
PR: yorukot/superfile#770
File: src/internal/ui/sidebar/render.go:45-45
Timestamp: 2025-04-12T14:01:13.080Z
Learning: In Go, identifiers should remain unexported (lowercase) when they're only used within their own package, even if other similar identifiers are exported. Exported (capitalized) identifiers should only be used when the element needs to be accessible from outside its package.
Learnt from: yorukot
PR: yorukot/superfile#841
File: src/internal/model_render.go:334-334
Timestamp: 2025-06-04T09:58:25.572Z
Learning: Before suggesting the creation of new constants for string literals, always check if a constant already exists in the codebase, especially in common packages like `src/internal/common/predefined_variable.go`.
src/internal/common/string_function.go (5)
Learnt from: lazysegtree
PR: yorukot/superfile#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.
Learnt from: lazysegtree
PR: yorukot/superfile#825
File: src/internal/model_render.go:0-0
Timestamp: 2025-05-22T04:50:02.071Z
Learning: The project standardized on using one ANSI package import (github.com/charmbracelet/x/exp/term/ansi) to avoid binary bloat and potential incompatibilities.
Learnt from: yorukot
PR: yorukot/superfile#841
File: src/internal/model_render.go:334-334
Timestamp: 2025-06-04T09:58:25.572Z
Learning: Before suggesting the creation of new constants for string literals, always check if a constant already exists in the codebase, especially in common packages like `src/internal/common/predefined_variable.go`.
Learnt from: lazysegtree
PR: yorukot/superfile#825
File: src/internal/model_render_test.go:15-25
Timestamp: 2025-05-22T04:53:45.663Z
Learning: In the superfile project, comments in test files documenting additional test cases with "// Additional tests" are intentional TODOs for future work and should not be flagged as missing implementations in PR reviews.
Learnt from: lazysegtree
PR: yorukot/superfile#825
File: src/internal/model_render.go:0-0
Timestamp: 2025-05-22T04:50:02.071Z
Learning: The project standardized on using one ANSI package import (either github.com/charmbracelet/x/ansi or github.com/charmbracelet/x/exp/term/ansi) to avoid binary bloat and potential incompatibilities.
src/internal/ui/sidebar/render.go (8)
Learnt from: lazysegtree
PR: yorukot/superfile#770
File: src/internal/ui/sidebar/render.go:0-0
Timestamp: 2025-04-12T13:51:24.691Z
Learning: In the sidebar component of yorukot/superfile, the partial list rendering in render.go is intentional. The sidebar implements scrolling functionality where ListUp/ListDown methods in navigation.go update cursor position and renderIndex to show the appropriate portion of the directory list based on available space.
Learnt from: lazysegtree
PR: yorukot/superfile#770
File: src/internal/ui/sidebar/render.go:0-0
Timestamp: 2025-04-12T13:51:24.691Z
Learning: In the sidebar component of yorukot/superfile, the partial list rendering in render.go is intentional. The sidebar implements scrolling functionality where ListUp/ListDown methods in navigation.go update cursor position and renderIndex to show the appropriate portion of the directory list based on available space.
Learnt from: lazysegtree
PR: yorukot/superfile#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.
Learnt from: lazysegtree
PR: yorukot/superfile#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.
Learnt from: lazysegtree
PR: yorukot/superfile#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
PR: yorukot/superfile#770
File: src/internal/ui/sidebar/consts.go:10-13
Timestamp: 2025-04-12T14:00:49.244Z
Learning: In the sidebar package, variables like `pinnedDividerDir` and `diskDividerDir` should remain unexported as they're only used within the package, even though their struct fields are exported with PascalCase (Name, Location) for JSON serialization purposes.
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/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.
src/internal/model.go (9)
Learnt from: lazysegtree
PR: yorukot/superfile#825
File: src/internal/model_render_test.go:15-25
Timestamp: 2025-05-22T04:53:45.663Z
Learning: In the superfile project, comments in test files documenting additional test cases with "// Additional tests" are intentional TODOs for future work and should not be flagged as missing implementations in PR reviews.
Learnt from: lazysegtree
PR: yorukot/superfile#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.
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#770
File: src/internal/ui/sidebar/consts.go:5-8
Timestamp: 2025-04-12T14:00:54.846Z
Learning: In the superfile codebase, structs that need to be serialized to/from JSON have exported fields (capitalized names like `Name` and `Location`) even when the variables of those structs are unexported. This is because Go's JSON marshaling/unmarshaling can only access exported struct fields.
Learnt from: lazysegtree
PR: yorukot/superfile#770
File: src/internal/ui/sidebar/render.go:45-45
Timestamp: 2025-04-12T14:01:13.080Z
Learning: In Go, identifiers should remain unexported (lowercase) when they're only used within their own package, even if other similar identifiers are exported. Exported (capitalized) identifiers should only be used when the element needs to be accessible from outside its package.
Learnt from: lazysegtree
PR: yorukot/superfile#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.
Learnt from: lazysegtree
PR: yorukot/superfile#770
File: src/internal/ui/sidebar/render.go:0-0
Timestamp: 2025-04-12T13:51:24.691Z
Learning: In the sidebar component of yorukot/superfile, the partial list rendering in render.go is intentional. The sidebar implements scrolling functionality where ListUp/ListDown methods in navigation.go update cursor position and renderIndex to show the appropriate portion of the directory list based on available space.
Learnt from: lazysegtree
PR: yorukot/superfile#770
File: src/internal/ui/sidebar/render.go:0-0
Timestamp: 2025-04-12T13:51:24.691Z
Learning: In the sidebar component of yorukot/superfile, the partial list rendering in render.go is intentional. The sidebar implements scrolling functionality where ListUp/ListDown methods in navigation.go update cursor position and renderIndex to show the appropriate portion of the directory list based on available space.
Learnt from: lazysegtree
PR: yorukot/superfile#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 }`.
src/internal/handle_panel_movement.go (10)
Learnt from: lazysegtree
PR: yorukot/superfile#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
PR: yorukot/superfile#825
File: src/internal/model_render_test.go:15-25
Timestamp: 2025-05-22T04:53:45.663Z
Learning: In the superfile project, comments in test files documenting additional test cases with "// Additional tests" are intentional TODOs for future work and should not be flagged as missing implementations in PR reviews.
Learnt from: lazysegtree
PR: yorukot/superfile#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.
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#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 }`.
Learnt from: lazysegtree
PR: yorukot/superfile#770
File: src/internal/ui/sidebar/render.go:0-0
Timestamp: 2025-04-12T13:51:24.691Z
Learning: In the sidebar component of yorukot/superfile, the partial list rendering in render.go is intentional. The sidebar implements scrolling functionality where ListUp/ListDown methods in navigation.go update cursor position and renderIndex to show the appropriate portion of the directory list based on available space.
Learnt from: lazysegtree
PR: yorukot/superfile#770
File: src/internal/ui/sidebar/render.go:0-0
Timestamp: 2025-04-12T13:51:24.691Z
Learning: In the sidebar component of yorukot/superfile, the partial list rendering in render.go is intentional. The sidebar implements scrolling functionality where ListUp/ListDown methods in navigation.go update cursor position and renderIndex to show the appropriate portion of the directory list based on available space.
Learnt from: lazysegtree
PR: yorukot/superfile#730
File: src/internal/model_render.go:653-654
Timestamp: 2025-03-29T10:02:04.260Z
Learning: A panel validation function should be implemented to ensure panel.cursor doesn't become negative or go out of bounds, but this should be addressed in a separate PR - not as part of the PR fixing crashes when opening files with the editor on an empty panel.
Learnt from: lazysegtree
PR: yorukot/superfile#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.
src/internal/handle_file_operations.go (5)
Learnt from: lazysegtree
PR: yorukot/superfile#825
File: src/internal/model_render_test.go:15-25
Timestamp: 2025-05-22T04:53:45.663Z
Learning: In the superfile project, comments in test files documenting additional test cases with "// Additional tests" are intentional TODOs for future work and should not be flagged as missing implementations in PR reviews.
Learnt from: lazysegtree
PR: yorukot/superfile#881
File: src/internal/utils/file_utils.go:0-0
Timestamp: 2025-06-27T02:36:23.457Z
Learning: In superfile's LoadTomlFile function refactoring, the preferred approach is to return structured errors (TomlLoadError) rather than using PrintfAndExit for all error conditions. This allows callers to decide appropriate error handling: fatal errors cause immediate exit, while non-fatal errors (like missing fields when not fixing) only print warnings and continue.
Learnt from: lazysegtree
PR: yorukot/superfile#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 }`.
Learnt from: lazysegtree
PR: yorukot/superfile#730
File: src/internal/model_render.go:653-654
Timestamp: 2025-03-29T10:02:04.260Z
Learning: A panel validation function should be implemented to ensure panel.cursor doesn't become negative or go out of bounds, but this should be addressed in a separate PR - not as part of the PR fixing crashes when opening files with the editor on an empty panel.
Learnt from: lazysegtree
PR: yorukot/superfile#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.
src/internal/model_render.go (8)
Learnt from: lazysegtree
PR: yorukot/superfile#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.
Learnt from: lazysegtree
PR: yorukot/superfile#825
File: src/internal/model_render_test.go:15-25
Timestamp: 2025-05-22T04:53:45.663Z
Learning: In the superfile project, comments in test files documenting additional test cases with "// Additional tests" are intentional TODOs for future work and should not be flagged as missing implementations in PR reviews.
Learnt from: lazysegtree
PR: yorukot/superfile#770
File: src/internal/ui/sidebar/render.go:0-0
Timestamp: 2025-04-12T13:51:24.691Z
Learning: In the sidebar component of yorukot/superfile, the partial list rendering in render.go is intentional. The sidebar implements scrolling functionality where ListUp/ListDown methods in navigation.go update cursor position and renderIndex to show the appropriate portion of the directory list based on available space.
Learnt from: lazysegtree
PR: yorukot/superfile#770
File: src/internal/ui/sidebar/render.go:0-0
Timestamp: 2025-04-12T13:51:24.691Z
Learning: In the sidebar component of yorukot/superfile, the partial list rendering in render.go is intentional. The sidebar implements scrolling functionality where ListUp/ListDown methods in navigation.go update cursor position and renderIndex to show the appropriate portion of the directory list based on available space.
Learnt from: lazysegtree
PR: yorukot/superfile#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 }`.
Learnt from: lazysegtree
PR: yorukot/superfile#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.
Learnt from: lazysegtree
PR: yorukot/superfile#730
File: src/internal/model_render.go:653-654
Timestamp: 2025-03-29T10:02:04.260Z
Learning: A panel validation function should be implemented to ensure panel.cursor doesn't become negative or go out of bounds, but this should be addressed in a separate PR - not as part of the PR fixing crashes when opening files with the editor on an empty panel.
Learnt from: lazysegtree
PR: yorukot/superfile#825
File: src/internal/model_render.go:634-644
Timestamp: 2025-05-22T04:45:44.934Z
Learning: In the superfile codebase, the `r.AddLines(res)` method handles truncation internally. When a string is passed to the `AddLines` method of a renderer, it internally calls `AddLineWithCustomTruncate` which truncates the line using `TruncateBasedOnStyle` with the configured maximum line width. Therefore, there's no need to truncate strings before passing them to `AddLines`.
src/internal/function.go (5)
Learnt from: lazysegtree
PR: yorukot/superfile#825
File: src/internal/model_render_test.go:15-25
Timestamp: 2025-05-22T04:53:45.663Z
Learning: In the superfile project, comments in test files documenting additional test cases with "// Additional tests" are intentional TODOs for future work and should not be flagged as missing implementations in PR reviews.
Learnt from: lazysegtree
PR: yorukot/superfile#770
File: src/internal/ui/sidebar/consts.go:10-13
Timestamp: 2025-04-12T14:00:49.244Z
Learning: In the sidebar package, variables like `pinnedDividerDir` and `diskDividerDir` should remain unexported as they're only used within the package, even though their struct fields are exported with PascalCase (Name, Location) for JSON serialization purposes.
Learnt from: lazysegtree
PR: yorukot/superfile#881
File: src/internal/utils/file_utils.go:0-0
Timestamp: 2025-06-27T02:36:23.457Z
Learning: In superfile's LoadTomlFile function refactoring, the preferred approach is to return structured errors (TomlLoadError) rather than using PrintfAndExit for all error conditions. This allows callers to decide appropriate error handling: fatal errors cause immediate exit, while non-fatal errors (like missing fields when not fixing) only print warnings and continue.
Learnt from: lazysegtree
PR: yorukot/superfile#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.
Learnt from: lazysegtree
PR: yorukot/superfile#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 }`.
🧬 Code Graph Analysis (1)
src/internal/model_render.go (1)
src/internal/common/style.go (1)
  • FooterCursorStyle (31-31)
🔇 Additional comments (24)
src/internal/config_function.go (1)

27-27: LGTM! Good standardization of TODO comment formatting.

The case change from "Todo" to "TODO" follows conventional commenting standards and improves consistency across the codebase.

src/internal/common/style_function.go (1)

240-240: LGTM! Consistent TODO formatting improvement.

The standardization from "Todo" to "TODO" aligns with conventional comment formatting while preserving the important note about code duplication that needs future attention.

src/internal/ui/sidebar/utils.go (1)

76-76: LGTM! TODO comment standardization completed.

The format change from "Todo" to "TODO" improves consistency while maintaining the important performance optimization note for future consideration.

src/internal/model_prompt_test.go (1)

29-29: LGTM! Test TODO standardization looks good.

The format change from "Todo" to "TODO" improves consistency in test documentation while preserving the important test case planning notes.

src/internal/handle_panel_up_down.go (1)

96-96: LGTM! Final TODO standardization completed.

The case change from "Todo" to "TODO" maintains the important test coverage reminder while following conventional comment formatting standards.

src/internal/type_utils.go (1)

33-33: LGTM! Comment standardization improves consistency.

The TODO comment format standardization aligns with conventional practices and improves codebase consistency.

src/internal/handle_panel_navigation.go (1)

31-31: LGTM! TODO standardization maintains consistency.

The comment format standardization improves consistency while preserving the intent to centralize error definitions.

src/internal/common/predefined_variable.go (2)

18-18: LGTM! TODO standardization preserves architectural intent.

The comment format standardization improves consistency while maintaining the important note about moving global properties to the model struct.


56-56: LGTM! Dependency comment standardization approved.

The TODO format standardization maintains the important note about programmatic dependency validation while improving consistency.

src/internal/utils/fzf_utils.go (1)

9-9: LGTM! Performance TODO standardization approved.

The comment format standardization improves consistency while preserving the important performance concern about blocking UI calls.

src/internal/ui/sidebar/disk_utils.go (2)

47-47: LGTM! Configuration TODO standardization approved.

The comment format standardization improves consistency while maintaining the note about making excluded disk mounts configurable.


60-60: LGTM! Disk mount configuration TODO standardized.

The TODO format standardization maintains the important note about making disk mount paths configurable while improving consistency.

src/internal/model_render.go (1)

46-46: LGTM! Excellent standardization of TODO comments.

The conversion from "Todo" to "TODO" across all comment lines improves consistency and follows conventional comment formatting standards. All TODO items address legitimate technical debt and future improvements without altering any functional code.

Also applies to: 54-54, 84-84, 94-94, 104-104, 128-128, 159-159, 205-205, 218-218, 260-260, 264-264, 269-269, 302-302, 328-328, 336-336, 393-393, 419-419, 432-432, 506-506, 666-666, 814-814

src/internal/function.go (1)

28-28: LGTM! Consistent TODO comment formatting.

The standardization from "Todo" to "TODO" improves readability and follows conventional comment practices. All TODO items identify valid technical improvements including function parameter enhancements, performance optimizations, and code organization improvements.

Also applies to: 61-61, 86-86, 226-226, 313-313, 369-369, 426-426

src/internal/handle_file_operation_test.go (1)

36-36: LGTM! TODO comment standardization in test file.

The conversion to uppercase "TODO" improves consistency in test code comments. These comments appropriately track future test improvements without affecting test functionality.

Also applies to: 129-129

src/internal/model_file_operations_test.go (1)

15-18: LGTM! Comprehensive TODO standardization in test file.

The standardization from "Todo" to "TODO" across all test comments improves consistency. The TODO items appropriately identify areas for enhanced test coverage including multiple directory initialization, clipboard variations, resizing tests, and validation improvements.

Also applies to: 34-44, 52-52, 66-66, 78-78, 83-83

src/internal/model.go (1)

27-33: LGTM! TODO comment standardization across core model file.

The conversion to uppercase "TODO" maintains consistency and follows conventional formatting. The TODO items appropriately identify important architectural improvements including moving global variables to model struct, separating utilities, and enhancing sizing calculations without affecting current functionality.

Also applies to: 63-63, 182-183, 309-309, 315-315, 356-356

src/internal/handle_file_operations.go (7)

85-85: LGTM! TODO comment standardization.

Proper standardization from "Todo" to "TODO" following conventional coding practices.


87-87: LGTM! TODO comment standardization.

Proper standardization from "Todo" to "TODO" following conventional coding practices.


276-276: LGTM! TODO comment standardization.

Proper standardization from "Todo" to "TODO" following conventional coding practices.


334-334: LGTM! TODO comment standardization.

Proper standardization from "Todo" to "TODO" following conventional coding practices.


499-510: LGTM! TODO comment standardization.

Proper standardization from "Todo" to "TODO" following conventional coding practices. The multi-line comment maintains its detailed explanation of the performance issue.


563-564: LGTM! TODO comment standardization.

Proper standardization from "Todo" to "TODO" following conventional coding practices.


597-597: LGTM! TODO comment standardization.

Proper standardization from "Todo" to "TODO" following conventional coding practices.

@yorukot yorukot changed the title refactor: standardize TODO comments across the codebase refactor: standardize TODO comments and ReadMe to README Jun 28, 2025
@yorukot yorukot merged commit 2056a28 into main Jun 28, 2025
12 checks passed
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Jul 28, 2025
This MR contains the following updates:

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

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.3.3`](https://github.com/yorukot/superfile/releases/tag/v1.3.3)

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

Hey folks. Releasing v1.3.3 with bug fix related to config file, and improvements in metadata panel feature.

#### Install:

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

#### Highlights

- Fixed a bug in config file correction that would make config file invalid. Thanks [@&#8203;estebandpena](https://github.com/estebandpena) for reporting the issue, and [@&#8203;wassup05](https://github.com/wassup05) for the fix.

#### Detailed Change Summary

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

##### Update
- feat: Metadata loading via bubbletea's tea.Cmd method, removed usage channels and custom goroutines [#&#8203;947](yorukot/superfile#947) by @&#8203;lazysegtree
- feat: Metadata panel into separate package, UI bug fixes, Code improvements [#&#8203;950](yorukot/superfile#950) by @&#8203;lazysegtree
- feat: add support for Python virtual environment in testsuite setup [#&#8203;956](yorukot/superfile#956) by @&#8203;Khitoshi

##### Bug fix
- fix: windows test ci [#&#8203;941](yorukot/superfile#941) by @&#8203;claykom
- fix: fixing `config.toml` [#&#8203;952](yorukot/superfile#952) by @&#8203;wassup05

</p>
</details> 

**Full Changelog**: yorukot/superfile@v1.3.2...v1.3.3

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

[Compare Source](yorukot/superfile@v1.3.1...v1.3.2)

Hey folks. Releasing v1.3.2 with multiple new features including implementation image preview using kitty protocol, and various bug fixes and internal improvements.

##### **You can now preview images in high quality — no more pixelation!**

<img width="1267" height="670" alt="image" src="https://github.com/user-attachments/assets/0f7ec48e-9386-4716-92a5-4a02783f6612" />

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

#### Highlights
- Added image preview via kitty protocol. Thanks @&#8203;JassonCordones and @&#8203;yorukot for the implementation.
- Added Zoxide support for path resolution in initial configuration. Thanks @&#8203;yorukot for this.
- New 0x96f Theme by @&#8203;filipjanevski 
- Various usability and layout bug fixes. See "Detailed Change Summary" below.  Thanks to @&#8203;larsn03  @&#8203;Frost-Phoenix  @&#8203;TheLazron @&#8203;vkhatsiur @&#8203;Khitoshi @&#8203;claykom 

##### Developer Improvements
- Added CI Action to run unit tests and build for windows.
- Updated contribution guidelines and MR template
- Added a dev.sh script for building, linting and running tests for faster development workflows.

####  Detailed Change Summary

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

##### Update
- Normalize user-facing naming to superfile [#&#8203;880](yorukot/superfile#880) by @&#8203;yorukot
- Add kitty protocol for image preview [#&#8203;841](yorukot/superfile#841) by @&#8203;JassonCordones
- feat: add Zoxide support for path resolution in initial configuration [#&#8203;892](yorukot/superfile#892) by @&#8203;yorukot
- feat: update superfile's help output [#&#8203;908](yorukot/superfile#908) by @&#8203;yorukot
- feat: Add Action to Publish to Winget [#&#8203;925](yorukot/superfile#925) by @&#8203;claykom
- feat: update superfile build test for the windows and macOS [#&#8203;922](yorukot/superfile#922) by @&#8203;yorukot
- Theme: add 0x96f theme [#&#8203;860](yorukot/superfile#860) by @&#8203;filipjanevski

##### Bug fix
- fix: outdated and broken nix flake [#&#8203;846](yorukot/superfile#846) by @&#8203;Frost-Phoenix
- fix: handle UTF-8 BOM in file reader [#&#8203;865](yorukot/superfile#865) by @&#8203;vkhatsiur
- fix icon displayed on spf prompt when nerdfont disabled [#&#8203;878](yorukot/superfile#878) by @&#8203;claykom
- fix: create item check for dot-entries [#&#8203;817](yorukot/superfile#817) by @&#8203;TheLazron
- fix: prevent pasting a directory into itself, avoiding infinite loop [#&#8203;887](yorukot/superfile#887) by @&#8203;yorukot
- fix: clear search bar value on parent directory reset [#&#8203;906](yorukot/superfile#906) by @&#8203;yorukot
- fix: enhance terminal pixel detection and response handling [#&#8203;904](yorukot/superfile#904) by @&#8203;yorukot
- fix: Cannot Build superfile on Windows [#&#8203;921](yorukot/superfile#921) by @&#8203;claykom
- fix: Improve command tokenization to handle quotes and escapes [#&#8203;931](yorukot/superfile#931) by @&#8203;Khitoshi
- fix: Dont read special files, and prevent freeze [#&#8203;932](yorukot/superfile#932) by @&#8203;lazysegtree
- Compress all files selected [#&#8203;821](yorukot/superfile#821) by @&#8203;larsn03

##### Optimization
- Metadata and filepanel rendering refactor [#&#8203;867](yorukot/superfile#867) by @&#8203;JassonCordones
- refactor: simplify panel mode handling in file movement logic [#&#8203;907](yorukot/superfile#907) by @&#8203;yorukot
- refactor: standardize TODO comments and ReadMe to README [#&#8203;913](yorukot/superfile#913) by @&#8203;yorukot

##### Documentation
- enhance: add detailed documentation for InitIcon function and update … [#&#8203;879](yorukot/superfile#879) by @&#8203;yorukot
- docs: add documentation for image preview [#&#8203;882](yorukot/superfile#882) by @&#8203;yorukot
- docs: update contributing guide and MR template [#&#8203;885](yorukot/superfile#885) by @&#8203;yorukot
- docs: update README and plugin documentation for clarity and structure [#&#8203;902](yorukot/superfile#902) by @&#8203;yorukot
- feat(docs): Update arch install package docs [#&#8203;929](yorukot/superfile#929) by @&#8203;booth-w

##### CI/CD
- ci: add MR title linting with semantic-pull-request action [#&#8203;884](yorukot/superfile#884) by @&#8203;yorukot
- ci: improve MR workflows with contributor greeting and title linter fix [#&#8203;886](yorukot/superfile#886) by @&#8203;yorukot

##### Dependencies
- build(deps): bump prismjs from 1.29.0 to 1.30.0 in /website [#&#8203;786](yorukot/superfile#786) by @&#8203;dependabot[bot]
- fix(deps): update dependency astro to v5.8.0 [#&#8203;787](yorukot/superfile#787) by @&#8203;renovate[bot]
- chore(deps): bump vite from 6.3.3 to 6.3.5 in /website [#&#8203;822](yorukot/superfile#822) by @&#8203;dependabot[bot]
- fix(deps): update dependency sharp to v0.34.2 [#&#8203;909](yorukot/superfile#909) by @&#8203;renovate[bot]
- fix(deps): update astro monorepo [#&#8203;894](yorukot/superfile#894) by @&#8203;renovate[bot]
- fix(deps): update fontsource monorepo to v5.2.6 [#&#8203;910](yorukot/superfile#910) by @&#8203;renovate[bot]

##### Misc
- chore(license): update copyright year [#&#8203;895](yorukot/superfile#895) by @&#8203;yorukot
- feat: add ignore missing field flag [#&#8203;881](yorukot/superfile#881) by @&#8203;claykom
- feat: add sitemap integration and update giscus input position [#&#8203;912](yorukot/superfile#912) by @&#8203;yorukot

</p>
</details> 

#### New Contributors
* @&#8203;filipjanevski made their first contribution in yorukot/superfile#860
* @&#8203;larsn03 made their first contribution in yorukot/superfile#821
* @&#8203;vkhatsiur made their first contribution in yorukot/superfile#865
* @&#8203;claykom made their first contribution in yorukot/superfile#878
* @&#8203;TheLazron made their first contribution in yorukot/superfile#817
* @&#8203;Khitoshi made their first contribution in yorukot/superfile#931

**Full Changelog**: yorukot/superfile@v1.3.1...v1.3.2

</details>

---

### Configuration

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

🚦 **Automerge**: Enabled.

♻ **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:eyJjcmVhdGVkSW5WZXIiOiI0MC42Mi4xIiwidXBkYXRlZEluVmVyIjoiNDAuNjIuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
@yorukot yorukot deleted the issue/888 branch October 24, 2025 02:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants