labeling node backend refactor for frontend fields#74
Merged
itang06 merged 3 commits intofeature/label-nodefrom Mar 15, 2026
Merged
labeling node backend refactor for frontend fields#74itang06 merged 3 commits intofeature/label-nodefrom
itang06 merged 3 commits intofeature/label-nodefrom
Conversation
…tamp and color fields
…for new time_labels schema
|
✅ PR approval conditions satisfied (1 lead OR 2 team members approved). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Updated the time_labels backend to support additional fields required by the frontend:
How?
Migration (update_time_labels.sql):
Models (models.rs):
DB functions (db.rs):
Testing
Postman testing:

2. POST /api/sessions/:id/time-label - 201 response, posted first label with start_timestamp, end_timestamp, label, and color
3. POST /api/sessions/:id/time-label - 201 response, posted second label with end_timestamp: null to verify nullable case
4. GET /api/sessions/:id/time-label?start=...&end=... - wide time range returns both labels, including the one with null
5. GET /api/sessions/:id/time-label?start=...&end=... - narrow range starting after the first label ends returns only the second