Commit Graph
4584 Commits
Author SHA1 Message Date
5bc13d60ea Add GitHub Actions CI workflow for build + test
Co-authored-by: danieldaquino <24692108+danieldaquino@users.noreply.github.com>
2026-05-13 17:05:40 -07:00
Daniel D’Aquino b6127e228e Require SENTRY_AUTH_TOKEN for Sentry dSYM upload
Warn and skip upload when SENTRY_AUTH_TOKEN is not set. Invoke
sentry-cli
with --auth-token, --org and --project flags and attempt an upload
including sources, falling back to a plain dSYM upload on failure.

Changelog-None
Closes: #3767

Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
2026-05-13 15:30:37 -07:00
a8c73bf67c Harden Xcode Cloud Sentry dSYM upload in post-build script
- Fix Sentry post-build dSYM upload fallback and script permissions
- Refine sentry-cli stderr capture in post-build script

Co-authored-by: danieldaquino <24692108+danieldaquino@users.noreply.github.com>
2026-05-13 14:39:21 -07:00
Daniel D’Aquino 572bb3b356 Add user bug report filing skill
Changelog-None
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
2026-05-11 16:35:11 -07:00
Daniel D’AquinoandGitHub 822fb5426c Merge pull request #3743 from danieldaquino/gh-3742
ndb: Add debug detection of stale read NostrDB transactions
2026-05-11 15:15:23 -07:00
Daniel D’AquinoandGitHub 07a7dbddc0 Merge pull request #3754 from damus-io/copilot/update-pr-template-highlight-issue-requirement
Highlight issue/ticket requirement in PR template
2026-05-11 12:11:13 -07:00
ce4cfb0548 Update PR template issue warning
Agent-Logs-Url: https://github.com/damus-io/damus/sessions/5ee6a40a-51bd-49c4-af98-f1cf7accfcbb

Co-authored-by: danieldaquino <24692108+danieldaquino@users.noreply.github.com>
2026-05-11 18:42:50 +00:00
Daniel D’AquinoandGitHub c2cdd1292f Merge pull request #3740 from danieldaquino/gh-3731
Sentry integration
2026-05-11 11:34:11 -07:00
Daniel D’Aquino 3c98282f95 Sentry integration
Changelog-Added: Added Sentry error and diagnostics reporting to aid
future quality improvements
Closes: #3731
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
2026-05-11 11:30:20 -07:00
Daniel D’Aquino 21ea74469b ndb: Add debug detection of stale read NostrDB transactions
Changelog-None
Closes: #3742
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
2026-05-09 23:56:45 -07:00
Daniel D’AquinoandGitHub c1c151396c Merge pull request #3739 from danieldaquino/gh-3738
Fix SafeNdbTxn failure cleanup and reclaim stale LMDB readers on startup
2026-05-08 10:32:36 -07:00
Daniel D’Aquino fe482a9416 ndb: Check and clear stale LMDB readers on init
Changelog-Changed: Clear stale LMDB readers on NostrDB init to prevent
reader slot leakage and runaway storage usage

Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
2026-05-07 17:09:34 -07:00
Daniel D’Aquino 034f667869 Fix per-thread txn leaks when SafeNdbTxn init fails
This addresses one failure path where if the value getter for a new
transaction returns `nil`, it would leak a read transaction, causing it
to remain open indefinitely, and leading to runaway storage usage.

Changelog-Fixed: Fixed database transaction leak that could lead to
higher storage usage

Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
2026-05-07 17:09:34 -07:00
Daniel D’AquinoandGitHub 52b5afaaf3 Merge pull request #3737 from danieldaquino/gh-3695
Replace Tenor GIF integration with Purple proxy
2026-05-04 11:49:52 -07:00
Daniel D’Aquino 111fabf0b3 Replace Tenor GIF integration with Purple proxy
Remove Tenor API client and models; add PurpleGIFAPIClient and a
robust GIFModels decoder that supports Tenor and KLIPY payloads.
Remove Tenor API key setting and Secrets entry. Update GIF picker to
accept a Purple-backed view model, adjust Labs text, and update
Xcode project file references.

Closes: #3695
Changelog-Changed: Made GIF keyboard widely available to Purple users
without need for an API key (Damus Labs)

Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
2026-05-04 11:39:15 -07:00
Daniel D’AquinoandGitHub 9dc9738377 Merge pull request #3733 from danieldaquino/gh-3726-c
Improve large-DB compaction UX and add developer auto-compact testing mode
2026-04-29 14:41:26 -07:00
Daniel D’Aquino 2af65320ef Improve large-DB compaction UX and add developer auto-compact testing
mode

- Skip automatic compaction when `data.mdb` is 10GB or larger, and
  surface an in-app notification instead of surprising users with a long
  startup wait
- Keep manual compaction available for large databases by tracking
  whether a next-launch compaction request was scheduled automatically
  or explicitly by the user
- Add a large-database explanation to the compaction loading screen to
  clarify that long runtimes are expected for oversized databases and
  are usually a one-time catch-up cost
- Add a developer-only `Every minute` auto-compact schedule to make
  rollout and reminder behavior easier to test locally
- Add and update unit tests covering large-database auto-compaction
  skips, request-source persistence, reminder scheduling, and the
  developer testing interval

Motivation:
TestFlight users with long-lived databases were hitting the brand-new
compaction flow for the first time, which could turn startup into a
multi-minute wait. These changes make automatic compaction less
disruptive for very large databases, preserve an explicit manual path
for users who want to optimize immediately, and add a fast
developer-only schedule to make the new behavior easier to validate
during testing.

This is an enhancement for an unreleased feature, so therefore no
changelog is needed.

Closes: https://github.com/damus-io/damus/issues/3730
Changelog-None

Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
2026-04-29 14:40:18 -07:00
Daniel D’AquinoandGitHub 53dde55616 Merge pull request #3732 from danieldaquino/gh-3726-b
Report Compaction Progress and Improve UI
2026-04-27 10:20:40 -07:00
Daniel D’Aquino d6654dff29 Report Compaction Progress and Improve UI
Add NdbCompactionProgress and Step with user-facing titles/details,
and a progress callback to Ndb.compact_if_needed to emit stage updates.
Refactor CompactionView to a single CompactionState and render linear
progress, step title/detail and percentage. Ensure UI updates happen on
the MainActor and surface errors/completion cleanly.

Changelog-None
Closes: https://github.com/damus-io/damus/issues/3730

Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
2026-04-27 10:09:59 -07:00
Daniel D’AquinoandGitHub cae83e5399 Merge pull request #3728 from danieldaquino/gh-3726
Move DB compaction to CompactionView
2026-04-23 19:53:17 -07:00
Daniel D’Aquino 0d2f55f4e3 Move DB compaction to CompactionView
Introduce CompactionView and CompactionLoadingView to schedule and run
Ndb compaction on a background task before showing the main UI. Replace
the direct compaction calls in ContentView and make CompactionView the
app's launch entry so startup compaction presents a loading UI and
avoids blocking the main thread.

Changelog-Fixed: Fixed startup crash when app performs long-running
compaction procedure
Closes: #3726

Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
2026-04-23 19:02:01 -07:00
Daniel D’AquinoandGitHub 5cb8a495b5 Merge pull request #3708 from askeew/favorites-fix-xcode
Fix favorites timeline
2026-04-13 12:07:35 -07:00
Daniel D’AquinoandGitHub f7669d1093 Merge pull request #3719 from damus-io/copilot/add-auto-compact-lmdb-setting
Auto compact LMDB on a schedule
2026-04-06 17:13:04 -07:00
Daniel D’Aquino 9285504d9a Add auto-compact LMDB schedule setting with UI and tests
Closes: https://github.com/damus-io/damus/issues/3718
Changelog-Added: Automatic lossless storage optimization
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
2026-04-06 15:01:06 -07:00
Daniel D’AquinoandGitHub 2e08fb9f8d Merge pull request #3663 from alltheseas/improve-blur-overlay-design
Improve BlurOverlayView to look protective, not broken
2026-04-06 14:56:36 -07:00
652e802ca6 Improve BlurOverlayView to look protective, not broken
The blur overlay previously used error-state iconography (eye.slash icon,
"Tap to load" button, raw URL display) which made users think media was
broken rather than intentionally hidden. Redesign to communicate
intentional protection:

- Replace eye.slash icon with shield icon
- Change title from "Media from someone you don't follow" to
  "Content hidden" (the old text was also wrong for undistractMode)
- Rename button from "Tap to load" to "Show"
- Remove raw URL display that added noise
- Remove unused properties (artifacts, size, damus_state, parentView)
  and dead ParentViewType enum that only existed for the URL display
- Simplify all 4 call sites to pass only the blur binding

Changelog-Changed: Redesigned media blur overlay to look like intentional protection instead of a broken state

Closes: https://github.com/damus-io/damus/issues/3662
Signed-off-by: alltheseas <alltheseas@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-06 14:48:30 -07:00
Askeew 75bbae86b3 Fix favorites timeline: filter in-place, manage queuing, persist tab selection and sync has_event.
Changelog-None:
Signed-off-by: Askeew <askeew@hotmail.com>
2026-03-27 09:10:36 +01:00
Daniel D’Aquino bfad604e5b Revert "Remove transaction inheritance"
This reverts commit c1fb8b592f.

It turns out we still need transaction inheritance.

Even though the current Ndb interface hides transaction objects from callers and prevents those transactions from being held open beyond the small sync window where the underlying query result is borrowed, there is nothing preventing that caller from making another nested ndb query call from within that closure.

Closes: https://github.com/damus-io/damus/issues/3688
Changelog-Fixed: Fixed issue where mentioned profile names would not render properly
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
2026-03-18 18:55:30 -07:00
Daniel D’AquinoandGitHub 92cca89c06 Merge pull request #3642 from ericholguin/ios-26-fixes
ui: Fixes for iOS 26 toolbars
2026-03-18 17:21:59 -07:00
ericholguinandDaniel D’Aquino d99443be6d ui: Fixes for iOS 26 toolbars
Note: This will only become user-facing once we switch to liquid glass
mode, therefore no changelog entry is needed now.

Changelog-None
Closes: https://github.com/damus-io/damus/issues/3702
Co-Authored-by: Daniel D’Aquino <daniel@daquino.me>
Signed-off-by: ericholguin <ericholguin@apache.org>
2026-03-18 17:07:25 -07:00
Daniel D’AquinoandGitHub f175e79a78 Merge pull request #3699 from alltheseas/fix/relay-list-bottom-cutoff
fix: add bottom padding to UserRelaysView to prevent last relay cutoff
2026-03-18 14:40:05 -07:00
alltheseasandClaude Opus 4.6 4fe94b081c fix: add bottom padding to UserRelaysView to prevent last relay from being cut off
Closes #3697

Signed-off-by: alltheseas

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 15:40:47 -05:00
Daniel D’AquinoandGitHub 38f0e9f152 Merge pull request #3698 from danieldaquino/gh-3696
Reduce max age for stale temporary snapshots
2026-03-18 12:19:36 -07:00
Daniel D’Aquino 96eb780f11 Reduce max age for stale temporary snapshots
The previous fix that implemented cleanup of temporary snapshots
included a max age for stale temporary snapshots, which was originally
set to 24h.

This improved the situation, but it still meant that the app could
accumulate 24 old snapshots, which leads to a non-trivial storage
amount.

This commit changes that to 30 minutes for better storage efficiency.

The previous fix was not published on the App Store yet, so no changelog
entry is needed.

Closes: https://github.com/damus-io/damus/issues/3696
Changelog-None
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
2026-03-18 12:07:55 -07:00
Daniel D’AquinoandGitHub 69ba4b2c38 Merge pull request #3690 from alltheseas/fix/post-compact-sigbus-crash
fix: delete stale lock.mdb during compaction to prevent SIGBUS crash
2026-03-16 23:14:03 -07:00
alltheseasandClaude Opus 4.6 9d687ce4f6 fix: delete stale lock.mdb during compaction to prevent SIGBUS crash
Also clean up temp directory on post-replace size mismatch to match
all other error paths in compact_if_needed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-16 23:13:13 -05:00
Daniel D’AquinoandGitHub e07e8c2dc3 Merge pull request #3668 from tyiu/translations
Translations
2026-03-16 20:00:48 -07:00
Daniel D’AquinoGitHubcoderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
ae1fefcfdd Fix subject-verb agreement issue in user-facing label
"Notes... usually contains" should be "Notes... usually contain" since "Notes" is plural.

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-03-16 20:00:02 -07:00
Daniel D’AquinoandGitHub cc22c1e97c Merge pull request #3665 from alltheseas/fix/relay-disconnect-freeze
Fix stale relay list: replace UserDefaults hex lookup with ndb query
2026-03-16 18:39:07 -07:00
2e10c0b4c5 Fix stale relay list: replace UserDefaults hex lookup with ndb query
Replace the fragile `latestRelayListEventIdHex` UserDefaults lookup in
`getLatestNIP65RelayListEvent()` with a direct nostrdb query using
`ndb.query(filters:maxResults:)` on the AUTHOR_KINDS index. This
eliminates the stale-hex failure mode where relay add/remove operations
would silently fall back to bootstrap or year-old relay lists.

Add an in-memory `lastSetRelayList` cache to bridge the nostrdb async
write gap — `set()` populates it, `getUserCurrentRelayList()` checks it
first, and `load()` clears it once ndb has committed.

Remove `latestRelayListEventIdHex` from: Delegate protocol,
DamusState, SaveKeysView, UserSettingsStore, and all test mocks.

Includes 5 regression tests that fail before the fix and pass after:
- testRemoveRelayDoesNotFallBackToBootstrapList
- testCacheBridgesAsyncWriteGap
- testRapidSequentialRemovesDoNotReintroduceRelays
- testLoadClearsCacheAndReadsFromNdb
- testNdbQueryFindsRelayListWithoutStoredHex

Changelog-Fixed: Fix stale relay list causing inability to disconnect relays
Closes: #3537
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: alltheseas <alltheseas@users.noreply.github.com>
2026-03-16 18:32:22 -07:00
Daniel D’AquinoandGitHub 537734397f Merge pull request #3686 from danieldaquino/gh-3680
feat: implement LMDB compact solution for storage optimization
2026-03-16 16:47:53 -07:00
Daniel D’Aquino 2c6e574b11 feat: implement LMDB compact solution for storage optimization
- Add `compact(to:)` method on `Ndb` using `mdb_env_copy2` / `ndb_snapshot`
  with `MDB_CP_COMPACT` flag to produce a smaller compacted database copy
- Add `compact_if_needed(db_path:)` static startup method that reads a
  UserDefaults flag, opens a temp Ndb, compacts to a sibling temp dir,
  atomically replaces `data.mdb`, cleans up, and clears the flag
- Add `set_compact_on_next_launch()` to schedule compaction from the UI
- Call `Ndb.compact_if_needed()` in `ContentView.connect()` before the
  main Ndb instance is opened
- Add `CompactDatabaseButton` to `StorageSettingsView` with a confirmation
  dialog that informs the user a restart is needed
- Add `NdbCompactionTests` unit tests covering flag API, no-op path,
  missing-DB path, and full round-trip compaction

Closes: https://github.com/damus-io/damus/issues/3680
Changelog-Added: Added "Compact Database" button in Settings → Storage that reclaims unused space by compacting the NostrDB on the next app launch
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
2026-03-16 16:29:27 -07:00
Daniel D’AquinoandGitHub 55817d066e Merge pull request #3683 from danieldaquino/gh-3681
Remove transaction inheritance
2026-03-16 14:11:58 -07:00
Daniel D’AquinoandGitHub 599a2f48e3 Merge pull request #3685 from danieldaquino/gh-3684
Fix snapshot promotion and add temporary snapshot cleanup
2026-03-16 10:28:19 -07:00
Daniel D’Aquino 2ea9cdd416 Fix snapshot promotion and add temporary snapshot cleanup
Preserve the last good shared snapshot until a replacement is fully staged, and proactively remove stale snapshot_temp_* directories left behind by interrupted snapshot attempts. This prevents orphaned temp snapshots from accumulating while avoiding false cleanup errors after successful promotion.

Changelog-Fixed: Fixed issue where temporary files would not get cleaned up
Closes: https://github.com/damus-io/damus/issues/3684
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
2026-03-16 03:03:56 -07:00
Daniel D’Aquinoandalltheseas c1fb8b592f Remove transaction inheritance
Transaction inheritance causes issues such as:
1. higher fragmentation in the db file, causing storage inefficiencies.
2. stale transactions holding an old view of the database, causing notes
   to be unavailable in certain scenarios

This should be safe because direct access to transactions is hidden
within the NostrDB Swift modules behind safe interfaces that prevent
direct access, thus reducing or eliminating the chance of accidentally
starting two transactions within the same thread (which would cause a
deadlock).

Closes: https://github.com/damus-io/damus/issues/3681
Changelog-Fixed: Disabled transaction inhe
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
Co-Authored-By: alltheseas <alltheseas@users.noreply.github.com>
2026-03-14 01:08:48 -07:00
Daniel D’Aquino 0a801b01cb Add full container file breakdown to storage settings export
Users reported total app storage significantly higher than what the
storage settings view shows. To aid debugging, the export now includes
a "Full Container File Breakdown" section that enumerates every regular
file in the app sandbox and shared app group container, sorted by size
descending so orphaned/unexpectedly large files are easy to spot.

Changes:
- StorageStatsManager: add ContainerFileEntry and containerFileBreakdown()
- StorageStatsViewHelper: add formatContainerFileBreakdown() helper and
  include it at the end of formatStorageStatsAsText output

Closes: https://github.com/damus-io/damus/issues/3677
Changelog-Added: Full container file breakdown in storage settings export
2026-03-13 15:09:54 -07:00
alltheseasandClaude Opus 4.6 1768432a1e Move client tag display from feed to note detail view
Remove client tag from EventTop (feed header) and display it inline
next to the timestamp in SelectedEventView instead. Removes unused
ClientTagLabel struct. Applies lineLimit(1) with tail truncation to
guard against unbounded client tag names.

Closes: https://github.com/damus-io/damus/issues/3672
Signed-off-by: alltheseas

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 20:49:29 -05:00
tyiu 31e281ce73 Fix localization issues and export strings for translation
Signed-off-by: Terry Yiu <git@tyiu.xyz>
2026-03-09 21:08:29 -04:00
Daniel D’Aquino 7937accfb3 Fix build errors in PostView tests
Changelog-None
Signed-off-by: Daniel D’Aquino <daniel@daquino.me>
2026-03-09 17:09:23 -07:00