Skip to content

fix: resolve issues #101 and #102#103

Merged
larkly merged 1 commit intomainfrom
copilot/review-20260330-1252
Mar 30, 2026
Merged

fix: resolve issues #101 and #102#103
larkly merged 1 commit intomainfrom
copilot/review-20260330-1252

Conversation

@larkly
Copy link
Copy Markdown
Owner

@larkly larkly commented Mar 30, 2026

Summary

  • use user cache dir resolution for debug logging instead of relying on HOME
  • surface errors when writing generated public key (.pub) during keypair save

Linked issues

Validation

  • cd src && make test
  • cd src && make build
  • cd src && make vet

@larkly larkly force-pushed the copilot/review-20260330-1252 branch from eb71eb2 to 58f4ab3 Compare March 30, 2026 13:03
Improve debug log path resolution and keypair save error handling to make behavior reliable in non-standard environments and avoid misleading success feedback.

Changes in this commit:

- shared/debug: replace HOME-based cache path construction with os.UserCacheDir().

- shared/debug: return a wrapped error when cache directory cannot be determined.

- keypaircreate: handle .pub write failures explicitly instead of ignoring errors.

- keypaircreate: preserve partial-save state when private key write succeeds but public key write fails.

- keypaircreate: track public-key save outcome and only render public-key success when it actually succeeded.

- keypaircreate: reset save status before each save attempt to avoid stale UI state.

User-visible impact:

- Debug logging now uses the platform cache directory consistently.

- Keypair save UI no longer shows contradictory success/error messages.

- Users are clearly informed when only the private key was saved.

Validation:

- cd src && make test

- cd src && make build

- cd src && make vet

Fixes #101

Fixes #102
@larkly larkly force-pushed the copilot/review-20260330-1252 branch from 58f4ab3 to 3bd2818 Compare March 30, 2026 13:04
@larkly larkly enabled auto-merge (rebase) March 30, 2026 13:06
@larkly larkly merged commit 8b053bf into main Mar 30, 2026
3 checks passed
@larkly larkly deleted the copilot/review-20260330-1252 branch March 30, 2026 13:12
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.

Handle .pub write errors in keypair create flow Debug log path handling is fragile when HOME is unset

1 participant