mohd-faraz

_blogs

// blogs / 20260816.md

Dev Log: August 16 Wrap-up

2026-08-16
#android#github-actions#sqlite#bug-fix

Overview

Today was a productive mix of 'housekeeping' and finally getting some visual data into the app. I spent a good chunk of time wrestling with the release pipeline, but I also managed to squash a particularly annoying duplication bug that’s been bugging me for a while.

What I Worked On

Automating the Release Dance

I finally got around to setting up a proper CI/CD pipeline using GitHub Actions. Before today, building a signed APK was a manual process on my local machine. Now, whenever I push a version tag, the workflow kicks in, sets up JDK 17, decodes my release keystore from a secret, and builds a signed release APK automatically.

I had to tweak the build.gradle logic to make signing optional. I didn't want the build to fail for other people just because they don't have my local environment variables set up. It now checks for a keystore path before trying to sign:

def releaseKeystorePath = System.getenv("RELEASE_KEYSTORE_PATH")
if (releaseKeystorePath) {
    signingConfigs {
        release {
            storeFile file(releaseKeystorePath)
            // ... other credentials from env
        }
    }
}

The "Ellipsis" Bug

I found a subtle bug where duplicate transactions were slipping through. It turns out Android sometimes truncates notification text with an ellipsis () when it's showing grouped notifications. Because my parser was looking for an exact string match to detect duplicates, a truncated name like Coffee Shop… wouldn't match the original Coffee Shop.

I updated the parser to strip out trailing punctuation and that specific ellipsis character. It’s a small fix, but it makes the data significantly cleaner. I also updated the repository logic to be more tolerant of one-sided truncation during string comparisons.

Visualizing the Spend

I finally started on the charts. I needed a way to pull daily debit totals for the monthly view. I spent some time writing a DAO query that groups transactions by day. The tricky part was ensuring the SQLite strftime function used the local timezone; otherwise, any transaction made late at night would show up on the wrong day in the chart.

SELECT CAST(strftime('%d', timestamp / 1000, 'unixepoch', 'localtime') AS INTEGER) AS dayOfMonth,
       SUM(amount) AS total
FROM transactions
WHERE type = 'DEBIT' 
  AND timestamp >= :start 
  AND timestamp <= :end
GROUP BY dayOfMonth

Wrapping Up

I ended up bumping the version a few times today (1.0.1 to 1.1.1) as I moved from fixing the build pipeline to actually shipping the chart data. It feels good to have the release process automated—it takes the friction out of shipping small fixes. Tomorrow I’ll probably focus on the UI side of these new charts to make sure they actually look decent on a small screen.

Catch you later.