Skip to content

Add File Explorer screen for selecting Bitcoin config file#8

Merged
pool2win merged 6 commits intop2poolv2:mainfrom
R27-pixel:feature/fileExplorer
Dec 31, 2025
Merged

Add File Explorer screen for selecting Bitcoin config file#8
pool2win merged 6 commits intop2poolv2:mainfrom
R27-pixel:feature/fileExplorer

Conversation

@R27-pixel
Copy link
Contributor

Changes:

  • Add FileExplorer component to handle directory reading and navigation
  • Introduce FileExplorer screen state
  • Render file list when FileExplorer screen is active
  • Allow navigation from "Bitcoin Config" into File Explorer via Enter
  • Save selected file path to app.bitcoin_conf_path

Interaction flow:

  1. Navigate to "Bitcoin Config"
  2. Press Enter to open File Explorer
  3. Navigate files
  4. Press Enter to select a file

@codecov
Copy link

codecov bot commented Dec 16, 2025

Codecov Report

❌ Patch coverage is 94.70199% with 16 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/main.rs 89.18% 12 Missing ⚠️
src/components/file_explorer.rs 98.06% 3 Missing ⚠️
src/ui.rs 97.05% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Contributor

@pool2win pool2win left a comment

Choose a reason for hiding this comment

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

Generally looks good, but we are missing unit tests and comments on structs and functions.

Copy link
Contributor

@pool2win pool2win left a comment

Choose a reason for hiding this comment

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

Looking much better now. Writing comments and unit tests is even more important in the LLM era, these help LLMs write better code and detect errors.

Next thing. If you look at the codecov report you can see we are missing coverage on 17 lines, if you dig into the report https://app.codecov.io/gh/p2poolv2/pdm/pull/8?src=pr&el=tree you can see that it is because we haven't written tests for a) wrapping around the index and b) setting selected field. Please add tests to cover those cases too.

@R27-pixel
Copy link
Contributor Author

Looking much better now. Writing comments and unit tests is even more important in the LLM era, these help LLMs write better code and detect errors.

Next thing. If you look at the codecov report you can see we are missing coverage on 17 lines, if you dig into the report https://app.codecov.io/gh/p2poolv2/pdm/pull/8?src=pr&el=tree you can see that it is because we haven't written tests for a) wrapping around the index and b) setting selected field. Please add tests to cover those cases too.

Added
integration coverage for file explorer selection and wrap

Copy link
Contributor

@pool2win pool2win left a comment

Choose a reason for hiding this comment

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

The codecov report still is below 90% for the file_explorer module. The parts about going to parent directory are untested. https://app.codecov.io/gh/p2poolv2/pdm/pull/8?src=pr&el=tree#fb36e13b4d2998c3c08398594680d935-R105 Let's add tests for those.

Copy link
Contributor

@pool2win pool2win left a comment

Choose a reason for hiding this comment

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

Sweet. Thanks.

@pool2win pool2win merged commit fe2c6b6 into p2poolv2:main Dec 31, 2025
3 checks passed
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.

2 participants