Skip to content

Import reads only the key file the user picks - #99

Merged
Jackicus merged 1 commit into
mainfrom
fix/import-key-file-dialog
Oct 7, 2026
Merged

Jackicus merged 1 commit into
mainfrom
fix/import-key-file-dialog

Conversation

@Jackicus

@Jackicus Jackicus commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Each API key row's Import button read ~/Documents/keys/<SERVICE>/<file> directly, with no choice by the user (and the row stat'ed that file to decide whether to show the button). Import is now always shown and opens a Gtk.FileDialog (title "Import the "), starting on the key drop's file for that field when it exists, otherwise in Documents; only the picked file is read, with load_contents_async, trimmed, and saved into the slot as before. Cancel reads nothing. CLAUDE.md's credentials paragraph says so.

Fixes #96

Verified

  • make check
  • Seen in the nested shell (start --stand-in, a made-up Documents/keys/TMDB/API KEY.txt in the stand-in home, nested settings only): before, Films → TMDB → Import set tmdb@1 at once with no dialog; after, Import opens the file dialog in Documents/keys/TMDB with the credentials still empty; Escape leaves them empty; picking the file and Open sets tmdb@1 to the file's contents, and Check becomes sensitive.
  • Nested stop + start: not needed, preferences only (no enable path)
  • CLAUDE.md, .claude/rules/, skills and docs/ still true

🤖 Generated with Claude Code

Each key row's Import button read ~/Documents/keys/<SERVICE>/<file>
straight away, and the row probed for that file to decide whether to show
the button, so the preferences read a file the user never chose. Import
now opens a Gtk.FileDialog, on the key drop's file when there is one, and
reads the picked file asynchronously.

Fixes #96

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jackicus
Jackicus merged commit f65701a into main Oct 7, 2026
1 check passed
@Jackicus
Jackicus deleted the fix/import-key-file-dialog branch October 7, 2026 03:43
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.

The Import button reads ~/Documents/keys without the user choosing a file

1 participant