Web dashboard step 4: ratings page and profile editor
Add /dashboard/ratings with the preference-state header, the "How ratings enter the algorithm" explainer, the Current tab (decayed neighbour weight, feed credit, prompt/rebuild membership, last-run neighbour usage, inline rating widget with note) and the paginated, filterable Events tab with superseded marking. Add /dashboard/profile: profile.md editor with atomic mode-preserving writes and profile_versions history plus restore, the parsed preview, OPML interests by theme, learned adjustments with staleness, the stored system prompt, and the profile-rebuild job form. Make profile::MAX_RATINGS_IN_REBUILD and profile::stored_version pub. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NHyYupFdBiR4VfoUM7NjSM
This commit is contained in:
@@ -21,7 +21,7 @@ pub const REBUILD_INTERVAL_DAYS: i64 = 7;
|
||||
/// so their `current_ratings` lookback is effectively unbounded.
|
||||
const RATINGS_LOOKBACK_DAYS: i64 = 36_500;
|
||||
pub const KV_LEARNED_ADJUSTMENTS: &str = "taste_profile_learned";
|
||||
const MAX_RATINGS_IN_REBUILD: usize = 200;
|
||||
pub const MAX_RATINGS_IN_REBUILD: usize = 200;
|
||||
|
||||
pub const NO_LEARNED_ADJUSTMENTS: &str = "No reader ratings have been collected yet. Judge purely on the stated preferences and interests above.";
|
||||
|
||||
@@ -239,7 +239,9 @@ struct ProfileVersion {
|
||||
built_at: String,
|
||||
}
|
||||
|
||||
async fn stored_version(db: &Db) -> anyhow::Result<Option<(i64, Timestamp)>> {
|
||||
/// The stored `(version, built_at)` of the taste profile, `None` before the
|
||||
/// first build. The dashboard's profile page reads it (web plan §11).
|
||||
pub async fn stored_version(db: &Db) -> anyhow::Result<Option<(i64, Timestamp)>> {
|
||||
let Some(raw) = db.kv_get(KV_PROFILE_VERSION).await? else {
|
||||
return Ok(None);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user