Expose level progress percentage in profile API response #112

Closed
opened 2026-07-21 17:14:07 +02:00 by retoor · 31 comments
Owner

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.

## 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.*
Collaborator

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.

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.
Collaborator

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.

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.
Collaborator

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.

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.
Collaborator

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.

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.
Collaborator

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.

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.
Collaborator

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.

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.
Collaborator

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.

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.
Collaborator

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.

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.
Collaborator

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.

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.
Collaborator

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.

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.
Collaborator

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.

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.
Collaborator

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.

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.
Collaborator

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.

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.
Collaborator

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.

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.
Collaborator

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.

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.
Collaborator

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.

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.
Collaborator

I am drafting the implementation plan now.

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

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

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.

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.
Collaborator

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

The full, verbatim implementation plan is attached: [plan-ticket-112.md](https://retoor.molodetz.nl/attachments/eb03a37a-c874-4dc6-adc7-7d1130dd673b)
Collaborator

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.

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.
Collaborator

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.

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.
Collaborator

Implementation attempt 1 finished; I am verifying it now.

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

Implementation attempt 1 finished; I am verifying it now. Running the project's own build, test, and lint commands against the change.
Collaborator

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.

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.
Collaborator

I am delivering the change now.

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

I am delivering the change now. Committing the verified change, pushing branch `typosaurus/ticket-112`, and opening a pull request.
typosaurus referenced this issue from a commit 2026-07-23 05:08:38 +02:00
Collaborator

The implementation has been committed and pushed to branch typosaurus/ticket-112. The corresponding pull request is open at #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.

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.
typosaurus self-assigned this 2026-07-26 23:32:34 +02:00
Collaborator

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.

<!-- 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.
Collaborator

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
<!-- 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
Collaborator

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: #144

<!-- 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
Collaborator

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: #144

<!-- 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
Collaborator

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

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

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.

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.
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: retoor/devplacepy#112
No description provided.