Skip to content

fix: migrate default db path to ~/.local/share/agent-receipts/#46

Merged
ojongerius merged 1 commit into
mainfrom
fix/dashboard-db-path
May 16, 2026
Merged

fix: migrate default db path to ~/.local/share/agent-receipts/#46
ojongerius merged 1 commit into
mainfrom
fix/dashboard-db-path

Conversation

@ojongerius
Copy link
Copy Markdown
Contributor

Summary

Migrates the dashboard's default database path from ~/.agent-receipts/receipts.db to ~/.local/share/agent-receipts/receipts.db to match the daemon, hook, and mcp-proxy (ar#414).

Part of ar#413 — path consolidation across all tools.

Changes

  • cmd/dashboard/main.go — replaced defaultDBPath() with XDG-aware version: honours $XDG_DATA_HOME when absolute, falls back to ~/.local/share
  • cmd/dashboard/main_test.go — updated existing path assertion; added TestDefaultDBPath_XDGDataHome covering absolute XDG override, relative XDG (ignored), and empty fallback
  • README.md, AGENTS.md, CONTRIBUTING.md — updated path references

Test plan

  • go test ./... — all 4 packages pass
  • go vet ./... — clean

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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, and CONTRIBUTING.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.

@ojongerius ojongerius force-pushed the fix/dashboard-db-path branch from f10c9c8 to 1d4e7c5 Compare May 16, 2026 00:35
@ojongerius ojongerius merged commit 20a0c00 into main May 16, 2026
4 checks passed
@ojongerius ojongerius deleted the fix/dashboard-db-path branch May 16, 2026 00:37
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