fix: migrate default db path to ~/.local/share/agent-receipts/#46
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Migrates the dashboard's default database path from ~/.agent-receipts/receipts.db to ~/.local/share/agent-receipts/receipts.db, with XDG_DATA_HOME support, aligning with the daemon, hook, and mcp-proxy.
Changes:
- Replaced
defaultDBPath()with an XDG-aware implementation (honours absolute$XDG_DATA_HOME, falls back to~/.local/share). - Added test coverage for XDG override, relative XDG (ignored), and empty fallback cases.
- Updated documentation references in
README.md,AGENTS.md, andCONTRIBUTING.md.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| cmd/dashboard/main.go | Introduces xdgDataHome() helper and updates defaultDBPath() to use XDG path |
| cmd/dashboard/main_test.go | Updates existing test expectations and adds XDG-specific test cases |
| README.md | Updates default path reference in usage example |
| CONTRIBUTING.md | Updates default path references in command tables |
| AGENTS.md | Updates default path reference in task table |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
f10c9c8 to
1d4e7c5
Compare
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
Migrates the dashboard's default database path from
~/.agent-receipts/receipts.dbto~/.local/share/agent-receipts/receipts.dbto match the daemon, hook, and mcp-proxy (ar#414).Part of ar#413 — path consolidation across all tools.
Changes
cmd/dashboard/main.go— replaceddefaultDBPath()with XDG-aware version: honours$XDG_DATA_HOMEwhen absolute, falls back to~/.local/sharecmd/dashboard/main_test.go— updated existing path assertion; addedTestDefaultDBPath_XDGDataHomecovering absolute XDG override, relative XDG (ignored), and empty fallbackREADME.md,AGENTS.md,CONTRIBUTING.md— updated path referencesTest plan
go test ./...— all 4 packages passgo vet ./...— clean