mohd-faraz

_blogs

// blogs / 20260427.md

Dev Log: April 27 Wrap-up

2026-04-27
#java#python#llm#refactoring#frontend

Overview

Today was one of those days where I spent as much time cleaning up my past self's decisions as I did building new things. Most of the focus was on the workflow builder—refining how we handle dynamic forms and fixing some quirks with how we parse AI responses.

What I Worked On

Making dynamic forms less cryptic

I spent a good chunk of time in the frontend logic for our workflow builder. We had this legacy convention for placeholders in our form filters where you’d use something like model+ to signify a dynamic value. It worked, but it looked like a typo. I decided to introduce a more explicit {fieldName} syntax. It’s self-documenting and much easier to read when you’re looking at a JSON config. I kept the old way working for backward compatibility, but I'm definitely pushing for the new curly-brace style going forward.

While I was in there, I also cleaned up the prompt selector. It was pulling in every single prompt template in the system, which was overkill. I added a filter so the agent node only shows prompts relevant to the builder. Much cleaner.

Taming Gemini 2.5+ outputs

I ran into an interesting issue with how we were handling LLM responses. Specifically, Gemini 2.5+ started returning content as a list of structured blocks—containing things like metadata and signatures—rather than just a flat string. I wrote a parser to iterate through these blocks and extract only the actual text parts. If we hadn't done this, we would have ended up leaking internal block metadata directly into the user interface.

I also caught a small but annoying bug in the agent initialization where we were passing a specific provider ID instead of the general provider name, which was breaking the LLM factory. Simple fix, but it's always the little things that trip you up.

Backend Housekeeping

On the Java side, I worked on a generic way to fetch project data for dropdowns. Instead of writing a bunch of specialized endpoints, I added a new query ID to our existing decorator pattern. Now, the frontend can just request project data by 'type' and get exactly what it needs for a dropdown without any extra backend bloat. It’s a small win for reusability.

Wrapping Up

The workflow builder is starting to feel a lot more solid. The config is easier to write, and the AI integration is getting more resilient to different output formats. Tomorrow, I’ll probably dive deeper into some mapping issues I found in the configuration binds. Catch you then.