feat(career): practice invitations — closest stamps + bring-these-up#953
Merged
Conversation
Career v3, WS1. The passport now points at the practice that pays: - Stubs carry next_star_at (the same primitive _stars() uses) and each passport exposes `nearest`: the top 3 non-qualifying songs by distance to their next star, in the worklist order. - "Closest stamps" strip above the shelf: the in-progress graded passports nearest to minting, each row naming the ask — N more songs (with the nearest title + best %) or the blocking Virtuoso drill. Rows open the passport. - "Bring these up" list on the stubs page of in-progress passports; earned pages stay memorabilia (no homework on a won badge). - Invitation-voiced throughout: no meters, no completion pressure. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Contributor
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughCareer passports now calculate nearest non-qualifying songs, expose them through the passport API, and render closest-stamp invitations plus nearest-song practice sections in the UI. ChangesCareer passport invitations
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant PassportUI
participant CareerAPI
participant PassportView
PassportUI->>CareerAPI: request passports
CareerAPI->>PassportView: build passport data
PassportView-->>CareerAPI: return nearest songs and thresholds
CareerAPI-->>PassportUI: return passport JSON
PassportUI->>PassportUI: render closest stamps and nearest songs
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Contributor
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/plugins/career/test_passports.py`:
- Around line 251-256: Update the comments above the feedpak fixtures to
describe ranking by the qualifying bar rather than distance to the next-star
cutoff. Keep the existing assertions and fixture values unchanged, and ensure
the qualifying-song exclusion and three-song cap remain accurately documented.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 91cbef9c-fd34-48a5-a024-02702d232c12
📒 Files selected for processing (5)
plugins/career/assets/career.cssplugins/career/routes.pyplugins/career/screen.htmlplugins/career/screen.jstests/plugins/career/test_passports.py
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Career v3, workstream 1. The passport now points at the practice that pays:
next_star_at(via a new shared_star_progress()— the one place the ascending-thresholds assumption lives, now used by_stars()too), and each in-progress passport exposesnearest: the top 3 non-qualifying songs ranked by distance to the qualifying bar (the badge ask — a 0★ song 1% from its next star is not closer to a ★★ badge than a 1★ song 5% from the bar).ppAskHTML()phrase — N more ★★ songs (with the nearest title at a floored %, so 74.9% can never display as the already-met "75%") or the blocking Virtuoso drill. Rows open the passport. The passport book's invite line uses the same shared phrase, so strip and book can never contradict.Review notes
Self-review (Codex is quota-locked until Jul 19; the internal review pass substituted): caught and fixed round-up-past-the-bar display, two unguarded derefs that could blank the passports tab on a malformed payload, next-star vs qualifying-bar ranking mismatch, the duplicated blocker phrasing, and a dead guard.
Testing
Bar-ranking vs next-star test, nearest ordering/exclusions/cap, full career suites (31 pytest + 9 vm), full JS glob 1171 green.
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Style
Tests