#112

Expose level progress percentage in profile API response

Status: closed
Lensflare Lensflare ·

Summary

GET /profile and GET /profile/{username} endpoints return level and xp fields but lack xp_to_next_level or level_progress_percent fields, preventing API consumers from displaying a level progress bar without reverse-engineering the server-side level formula.

Steps to Reproduce

  1. Send a GET request to /profile or /profile/{username}.
  2. Inspect the JSON response body.
  3. Observe that only level and xp fields are present.

Expected Behaviour

The response should include a field such as xp_next_level (total XP needed for the next level) and/or xp_progress_pct (percentage towards the next level).

Actual Behaviour

The response contains level and xp but no field indicating remaining XP or progress percentage toward the next level.

Environment

Not provided.


Reported by Lensflare via DevPlace.

Updates & comments

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 ·

I need input to continue.

What I tried: Retried this step 3 times.
What I found: Each attempt failed for internal reasons unrelated to this ticket. The details are in the operator's logs; this is not a judgment about the ticket.

The system needs operator attention before I can continue. Reply here once things are healthy and I will resume from where I left off.

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 ·

Progress update: research round 1 is still running (10 minutes elapsed). I have not stalled; I will report the result here the moment this step completes.

Developer reply from dev typosaurus ·

Progress update: research round 1 is still running (20 minutes elapsed). I have not stalled; I will report the result here the moment this step completes.

Developer reply from dev typosaurus ·

Internal infrastructure issue during research

The LLM backend is not responding correctly: the run timed out. This is an infrastructure problem, not a problem with this ticket. I will retry automatically (up to 3 times) and report the result here.

Developer reply from dev typosaurus ·

Progress update: research round 1 is still running (10 minutes elapsed). I have not stalled; I will report the result here the moment this step completes.

Developer reply from dev typosaurus ·

Progress update: research round 1 is still running (20 minutes elapsed). I have not stalled; I will report the result here the moment this step completes.

Developer reply from dev typosaurus ·

Progress update: research round 1 is still running (10 minutes elapsed). I have not stalled; I will report the result here the moment this step completes.

Developer reply from dev typosaurus ·

Progress update: research round 1 is still running (20 minutes elapsed). I have not stalled; I will report the result here the moment this step completes.

Developer reply from dev typosaurus ·

Progress update: research round 1 is still running (10 minutes elapsed). I have not stalled; I will report the result here the moment this step completes.

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 ·

I need input to continue.

What I tried: Retried this step 3 times.
What I found: Each attempt failed for internal reasons unrelated to this ticket. The details are in the operator's logs; this is not a judgment about the ticket.

The system needs operator attention before I can continue. Reply here once things are healthy and I will resume from where I left off.

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 exactly what is described: the profile API response lacks any level progress field, despite the level formula being simple (100 XP per level) and the landing page already exposing xp_progress_pct. The ticket is accurate, specific, and actionable without further investigation.

Decision is to proceed. Next step is drafting a concrete implementation plan.

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 from the investigation findings to expose level progress in the profile API. The plan adds two derived fields, xp_progress_pct and xp_next_level, to the GET /profile and GET /profile/{username} endpoints, updates the ProfileOut schema, and includes a new test for validation.

The plan is ready for execution. Handing it over to the execution agent to implement the schema change, route computation, and test addition as specified.

Developer reply from dev typosaurus ·

The full, verbatim implementation plan is attached: plan-ticket-112.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 ·

Progress update: implementation attempt 1 is still running (10 minutes elapsed). I have not stalled; I will report the result here the moment this step 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 the project's own checks passed. The build, test, and lint commands completed successfully.

The next step is to commit the change, push the 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-112, and opening a pull request.

Developer reply from dev typosaurus ·

The implementation has been committed and pushed to branch typosaurus/ticket-112. The corresponding pull request is open at https://retoor.molodetz.nl/retoor/devplacepy/pulls/127.

This change was submitted because it passed the project's internal checks and is ready for further evaluation.

The pull request will be monitored for review, merge, or additional feedback.

Developer reply from dev typosaurus ·

<!-- typosaurus:claim run=a6697d32c4ea49b4a9767bd5a8c1119f id=25883843a40c team=e128e22619ab46999074678e27b7e0f7 -->

YELENA ยท project-manager - 2026-07-26T22:13:49.232020+00:00

Ticket claimed by team Dev Team ONE ELITE.
Branch: typosaurus/112-expose-level-progress-percentage-in-profile-api-response
Agents assigned: @yelena, @katya, @mila, @vera, @nadia, @sveta, @tanya, @zoya, @irina, @oksana, @larisa
Next: Decompose the ticket into an executable tree.

Developer reply from dev typosaurus ·

<!-- typosaurus:progress run=a6697d32c4ea49b4a9767bd5a8c1119f id=5a7fd449690d team=e128e22619ab46999074678e27b7e0f7 -->

YELENA ยท project-manager - 2026-07-26T23:28:22.666163+00:00

Progress

State: running
Completed: 7/7 nodes
Current: none - none
Cost: 0.0600 USD ยท Elapsed: 1h 14m

Completed

  • Expose level progress percentage in profile API response - done
  • Investigate level formula and profile data flow for xp_next_level/xp_progress_pct - done
  • Add xp_next_level and xp_progress_pct to ProfileOut schema and compute in route handler - done
  • Write API test for xp_next_level and xp_progress_pct in profile JSON response - done
  • Update API documentation for profile endpoints with new response fields - done
  • Review implementation against acceptance criteria and conventions - done
  • @nadia: Implement xp_next_level and xp_progress_pct fields in UserOut schema and profile route handler per the findings documented above. - done

Open

  • none
Developer reply from dev typosaurus ·

<!-- typosaurus:summary run=a6697d32c4ea49b4a9767bd5a8c1119f id=97fc0e90ca17 team=e128e22619ab46999074678e27b7e0f7 -->

YELENA ยท project-manager - 2026-07-26T23:28:40.566066+00:00

Result

Run completed for ticket #112.

Delivered:

  • The ticket objective is satisfied: Expose level progress percentage in profile API response - met (see commits)

Not delivered:

  • none

Verification: make test - see nodes
Commits: 3 ยท Cost: 0.0469 USD ยท Duration: 1h 14m
Pull request: https://retoor.molodetz.nl/retoor/devplacepy/pulls/144

Developer reply from dev typosaurus ·

<!-- typosaurus:summary run=a6697d32c4ea49b4a9767bd5a8c1119f id=b82d07c7a6c4 team=e128e22619ab46999074678e27b7e0f7 -->

YELENA ยท project-manager - 2026-07-26T23:28:42.821107+00:00

Result

Run completed for ticket #112.

Delivered:

  • The ticket objective is satisfied: Expose level progress percentage in profile API response - met (see commits)

Not delivered:

  • none

Verification: make test - see nodes
Commits: 3 ยท Cost: 0.0469 USD ยท Duration: 1h 14m
Pull request: https://retoor.molodetz.nl/retoor/devplacepy/pulls/144

Developer reply from dev typosaurus ·

The ticket has been closed. Work on this item has been stopped as planned. No further action is required at this time.

Developer reply from dev typosaurus ·

This ticket has reached its outcome. The ticket is closed and the workspace 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.

Log in to comment.