Repository navigation
Public profiles: settings page, sections, identity, favourites and comparison - #240
Open
alistairjcbrown wants to merge 9 commits into
Open
alistairjcbrown wants to merge 9 commits into
alistairjcbrown wants to merge 9 commits into
Conversation
A profile's settings move to their own page, /personalise/profile/: the handle, then a switch for each section (Seen stats, watchlist, favourite venues, Seen list), then the public switch, over a preview drawn with the profile page's own sections. Every section starts on, but the rules refuse `public: true` until a choice has been saved, so nobody publishes without seeing it. Without the capability, switching off is now the only change allowed. The account bar's panel says where the profile stands and links to the page. The profile page draws only the sections the Worker says are shown, and a profile public from before sections shows everything, as it did. Showing the stats without the Seen list still sends the list, since the stats are worked out in the browser; the settings say so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GBhsxV5yDVkwkbmmrioZpp
A new "About you" step on /personalise/profile/ takes an optional display name and links to the reader's Letterboxd, IMDb and website. The name heads the profile in place of the handle, which leads the line beneath it; links are stored as identifiers (a username, an IMDb user id) and the page builds the addresses, bar an https website. The preview shows both as they're typed. A name is stripped rather than escaped: the characters HTML and JSON give meaning to, control and bidirectional characters, and a leading `$` are dropped as it's typed, refused by the rules, and stripped again when the page reads it. Apostrophes stay. The rules hold every field to the module's patterns, and a test holds the rules' copy to it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GBhsxV5yDVkwkbmmrioZpp
A new "Favourite films" step on /personalise/profile/ picks up to four films to head the profile, in the reader's order. The Seen list is searched as the reader types, and TheMovieDB on "Search all films", as the film search on /personalise does. Each favourite is its own snapshot rather than a reference into the Seen list, so editing Seen doesn't undo it, a hidden Seen list stays wholly hidden, and a reader with no Seen list can still pick. The profile draws them four across or two by two, linked to the film's page while it's showing, and the preview shows picks before they're saved. The rules hold the count and each film's fields to the module, and a test holds the rules' copy to it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GBhsxV5yDVkwkbmmrioZpp
Settings: one draft saved with one Save, in a bar stuck to the bottom of the screen, beside a live preview where there's room and in a full-screen dialog from the bar where there isn't. The steps lose their numbers, the handle is checked as it's typed, and publishing becomes a moment: it lists what goes public and what stays hidden, saves and publishes in one write, then lights up with the address, Copy link and Share. Favourites sit in four places that can be dragged into order, an empty one opening the search. Profiles: the favourites head the page, fanned over a blurred wash of their posters, with a line of the reader's taste from their stats under the name, and Copy link beside Edit profile for the owner. On someone's profile the watchlist leads with what's showing this week, linking to the planner, and its buttons speak of them by name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GBhsxV5yDVkwkbmmrioZpp
A signed-in visitor sees, above the owner's lists, the films they both want to see (with "Plan together" opening the planner on those with a showing to book), the films they've both seen, and each one's films the other has seen. It is worked out in the visitor's browser from their own lists against what the profile sends, and only from lists the owner shows: the Seen list sent for the stats while hidden is not compared, since that would name films from it. Signed out, it is an invitation to start lists instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GBhsxV5yDVkwkbmmrioZpp
The comparison no longer leads someone else's profile: a small card offers it instead. Signed in, it says how many films the visitor shares with the owner and opens the groups on Compare, each now a poster stack as the watchlist's groups are, with Hide to put the card back. Signed out, it invites the visitor to start lists of their own. Either card can be dismissed: the sign-up one for every profile, the compare one for that profile, remembered in the browser. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GBhsxV5yDVkwkbmmrioZpp
A dismissed card now comes back the next day rather than staying gone: out of the way for the visit, without being hidden for good. The sign-up card still goes for every profile, the compare card for one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GBhsxV5yDVkwkbmmrioZpp
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GBhsxV5yDVkwkbmmrioZpp
Letterboxd usernames are letters, numbers and underscores, so a hyphen is refused as it's typed, by the rules and by the Worker's copy of the pattern. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GBhsxV5yDVkwkbmmrioZpp
This branch has not been deployed
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.
The site's half of the public profile work. The Worker's half is clusterflick/api-profiles on the same branch name. Deploy order: Worker, then Firestore rules, then this site. If the rules and site go out first, a reader could hide a section the old Worker still sends.
Settings:
/personalise/profile/public: truein one write. The card then lights up with the address, Copy link and Share. Making it private never waits for anything.Profile page:
/u/<handle>/Favourites as the hero. Up to four, fanned over a blurred wash of their posters. A favourite that's showing links to its film page.
Taste line under the name, e.g. "Mostly drama · Big on the 2000s · 2 Wong Kar-wai films". It only appears with the stats, and each part only when it's true enough to say.
Owner: Edit profile and Copy link.
Watchlist: leads with what's showing this week and links to the planner. Its buttons speak of the owner by name.
Comparison, offered not shown. A signed-in visitor gets a card ("You have 4 films in common with Siobhán") with Compare, which opens groups as poster stacks:
Signed out, the card invites the visitor to start their own lists. Either card can be dismissed for the day. Only lists the owner shows are compared.
Data and rules
users/{uid}/meta/profile:sections, required beforepublic: true;displayName, stripped of HTML and JSON-significant, control and bidirectional characters;links;favourites.@/lib/user-profile, again infirestore.rules(held to the module byrules-copy.test.ts), and again by the Worker.Testing
npm run lintis clean.src/lib, covering the draft, comparison, taste line, favourites, identity and day-long dismissals.npm run test:rulespasses all 101 tests against the emulator./personalisefail the same way onmainwith that stand-in data. CI runs them against the real data.Generated by Claude Code