mohd-faraz

_blogs

// blogs / 20260422.md

Dev Log: April 22 Wrap-up

2026-04-22
#refactoring#typescript#debugging#backend

Overview

Today was one of those days where I spent a lot of time jumping between different parts of the stack to fix consistency issues. Most of the focus was on standardizing how we handle facility context in our reporting and making our internal logs a bit easier on the eyes.

What I Worked On

Cleaning up the printing logic

I spent a good chunk of the afternoon wrestling with how we pass arguments to our document generation service. We were running into issues where certain reports were missing the specific facility context they needed to pull the right data.

Instead of just hacking in the ID every time I saw a failure, I decided to centralize the logic in our base service. I wrote a helper method to handle appending the facility ID to the argument string. It’s a simple change, but applying it across all the various UI components and decorators felt like a massive cleanup. It’s one of those 'death by a thousand cuts' situations where you realize the same logic is being rewritten slightly differently in ten different places, and you just have to step in and standardize it.

Making timestamps human-readable

I spent some time updating our request utility. We have a lot of fields that come through as millisecond timestamps, which are a nightmare to debug when you're looking at raw data. I added a few more common date and slot-related fields to our auto-conversion logic. Now, when I'm looking at appointment or scheduling data, I don't have to keep a converter tab open in my browser just to know if a slot was for 10:00 AM or 10:00 PM.

Sometimes the most satisfying wins aren't complex algorithms, but just making the daily dev experience 10% less annoying.

Decorator adjustments

I had to do a bit of a dance with our service decorators today. I ended up reverting a previous commit that wasn't quite right and re-implementing the registration for our training resource logic. It’s a bit of boilerplate, but making sure these components are registered correctly in the application runner is key to keeping the management modules functional.

Wrapping Up

Overall, a productive day. It felt good to delete some redundant code in the UI and make the backend logs more readable. Tomorrow, I’m planning to dive deeper into some performance bottlenecks we've been seeing in the reporting engine. Hopefully, it’s just a missing index and not a complete architectural headache. Catch you then.