#146

Add missing icon field to badges API response

Status: closed
Lensflare Lensflare ·

Summary

The badges API endpoint returns badge objects that are missing the icon field, which is present in the web application's badge display. Each badge should include an icon along with its name, but currently only the name is delivered.

Steps to Reproduce

  1. Make a GET request to the badges API endpoint.
  2. Observe the response JSON contains only name and created_at for each badge, with no icon field.

Expected Behaviour

Each badge object in the API response should include an icon field (e.g., a URL or icon identifier) in addition to name and created_at.

Actual Behaviour

Each badge object only contains name and created_at; the icon field is absent.

Environment

Not provided.


Reported by Lensflare via DevPlace.

Updates & comments

Lensflare Lensflare ·

The icon looks like a simple emoji, so the string type for the icon will be fine. No need for urls or icon ids.


Posted by Lensflare via DevPlace.

Developer reply from dev typosaurus ·

I am picking this ticket up now.

First I will bring up an isolated workspace with a fresh checkout and investigate whether the ticket matches the current state of the code before planning any change. I will announce every step here before I take it.

Developer reply from dev typosaurus ·

Starting research round 1 of at most 5.

I am now reading the relevant source, tests, and prior work in the live checkout to verify the ticket and gather the context needed for a concrete plan. This can take a while; I will post periodic progress updates until it completes.

Developer reply from dev typosaurus ·

Investigated the ticket against the current source and tests. The analysis confirms the API response is missing the icon field as described: the BadgeOut schema lacks it, and no enrichment occurs before serialization. The findings yield a precise, minimal fix that matches the ticket’s expected behavior, with no contradictions or need for further research.

Drafting a concrete implementation plan next.

Developer reply from dev typosaurus ·

I am drafting the implementation plan now.

The research confirmed the ticket; I am turning the findings into a concrete, verifiable plan.

Developer reply from dev typosaurus ·

Drafted an implementation plan based on the investigation findings. The plan covers schema updates, route enrichment, optional API testing, and verification steps needed to expose the icon field in badge API responses.

Handing the plan to the execution agent for implementation.

Developer reply from dev typosaurus ·

The full, verbatim implementation plan is attached: plan-ticket-146.md

Developer reply from dev typosaurus ·

Starting implementation attempt 1 of at most 5.

I am executing the plan inside this ticket's isolated workspace. This can take a while; I will post periodic progress updates until it completes.

Developer reply from dev typosaurus ·

Implementation attempt 1 finished; I am verifying it now.

Running the project's own build, test, and lint commands against the change.

Developer reply from dev typosaurus ·

The change was implemented on the first attempt, and all configured project checks-build, test, and lint-completed successfully. The implementation is therefore stable and ready for review. Next steps are to commit the changes, push a branch, and open a pull request.

Developer reply from dev typosaurus ·

I am delivering the change now.

Committing the verified change, pushing branch typosaurus/ticket-146, and opening a pull request.

Developer reply from dev typosaurus ·

The change has been committed and pushed to branch typosaurus/ticket-146. A pull request is open at https://retoor.molodetz.nl/retoor/devplacepy/pulls/147. The implementation passed the project's own checks, so the branch was submitted for integration.

The next step is to monitor the pull request for review, merge, or further feedback.

Developer reply from dev typosaurus ·

The pull request has been merged, resolving the ticket. The change addresses the reported issue and has passed review. No further follow-up is required at this time.

Developer reply from dev typosaurus ·

This ticket has reached its outcome. The pull request is merged and the branch is no longer needed.

Would you like me to clean up the branch and workspace for this ticket? Reply with /typosaurus cancel-and-cleanup to confirm, or leave it as is.

Developer reply from dev typosaurus ·

Totally correct, the file(s):https://retoor.molodetz.nl/retoor/devplacepy/pulls/147/files#diff-8072c8ef0898a92e2443bc732bab9813a0b3dc14

But no unit test, but i have a agent that will recursively check that and update tests.

Will deploy now.

Log in to comment.