Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideStandardizes the default shell to zsh and updates the combo box to select the zsh entry by default in the user admin UI. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- The hard-coded index
shell.set_active(7)is brittle and will break if the list of shells changes; consider deriving the active index programmatically based on the selected shell string or keeping the shell options in a data structure you can search. - Instead of hard-coding
/usr/local/bin/zsh, consider resolving the shell path dynamically (e.g., via/etc/shells,shutil.which, or configuration) to better handle differences across environments.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The hard-coded index `shell.set_active(7)` is brittle and will break if the list of shells changes; consider deriving the active index programmatically based on the selected shell string or keeping the shell options in a data structure you can search.
- Instead of hard-coding `/usr/local/bin/zsh`, consider resolving the shell path dynamically (e.g., via `/etc/shells`, `shutil.which`, or configuration) to better handle differences across environments.
## Individual Comments
### Comment 1
<location path="src/add_admin.py" line_range="131" />
<code_context>
shell.append_text('ksh')
shell.append_text('zsh')
- shell.set_active(3)
+ shell.set_active(7)
shell.connect("changed", self.on_shell)
label = Gtk.Label(label='<b>Set Hostname</b>')
</code_context>
<issue_to_address>
**issue (bug_risk):** Using index 7 for `set_active` is out of range for the defined shell items and will likely result in no selection.
The combo box has 6 items (`sh`, `csh`, `bash`, `rbash`, `ksh`, `zsh`), so valid indices are 0–5. `shell.set_active(7)` won’t select anything. If you want `zsh` as the default, use index 5 or derive the index programmatically based on where `zsh` is added.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
pkgdemon
approved these changes
Mar 1, 2026
pkgdemon
approved these changes
Mar 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
Set the default shell selection to zsh in the admin creation UI and update the combo box to highlight zsh by default.
Enhancements: