Week 040 — Cleaning Up the Header

A useful but unplanned cleanup week — the kind where fixing one thing keeps revealing the next.

Week of August 18, 2025

Progress

The notification badge was implemented in the header — a visual indicator when there are unread notifications. Notification button and profile button icons were added.

An issue with the siteURL() function: it used echo internally, which means it can't be called within another echo or used anywhere a value is expected. When trying to build a notification API URL inside a PHP string, it broke. The fix replaced both the variable and the function with a SITE_URL constant — cleaner, simpler, works in any context.

Item image saves had broken again. The new image path wasn't being collected and saved with the form data. Traced and fixed.

The user profile page's data-loading bug (user info not populated when clicking the profile button) was fixed — the router had been expecting a user ID in the URL; changed to pull it from the session instead.

By Friday: add item working, unsaved changes detection on both the item page and user profile page, logout button added to the profile page, phone number/country code save bug fixed.

The Hard Part

No single hard bug this week — just a queue of fixes that needed to be worked through. The fires on Monday (actual fires, not metaphorical ones) kept Tuesday from being the first productive day. Sometimes the environment is the blocker.

Next Week

Looking toward production. The application has been running only on macbaby.local for almost a year. Time to put it in front of real people.