mirror of
https://github.com/Permissionless-Software-Foundation/psf-memo.git
synced 2026-09-21 16:52:01 -07:00
Record profile-last-post completion in backlog and briefing
By specifier.
This commit is contained in:
+43
-17
@@ -647,6 +647,19 @@ that a single user-facing feature may require specs in more than one component.
|
|||||||
`psf-memo-client/specs/recent-profile-display.feature`,
|
`psf-memo-client/specs/recent-profile-display.feature`,
|
||||||
`psf-memo-db/specs/recent-profile-identity.feature`.
|
`psf-memo-db/specs/recent-profile-identity.feature`.
|
||||||
|
|
||||||
|
49. **`/profile/recent` now requires a `profileRecency` record.** A profile
|
||||||
|
appears only if the indexer (or the recency backfill) recorded at least one
|
||||||
|
confirmed qualifying post for it. The `recent-profile-identity` fixture had
|
||||||
|
to seed `profileRecency` or its profiles vanished. The store is
|
||||||
|
address-keyed for idempotent upsert, so `ProfileQuery.listRecentProfiles`
|
||||||
|
still scans and sorts the whole recency index in memory (O(P log P)); that
|
||||||
|
is within spec (the spec forbids scanning `addrPostHeights` or sorting every
|
||||||
|
profile, not sorting the recency index), and a bounded-ordered compound key
|
||||||
|
is a documented follow-up. Specs:
|
||||||
|
`psf-memo-indexer/specs/profile-recency-indexing.feature`,
|
||||||
|
`psf-memo-db/specs/recent-profile-ordering.feature`,
|
||||||
|
`psf-memo-db/specs/backfill-profile-recency.feature`.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 10. Run / verify the app
|
## 10. Run / verify the app
|
||||||
@@ -697,23 +710,36 @@ At the end of each session, update this file:
|
|||||||
- Note the current `master` HEAD commit.
|
- Note the current `master` HEAD commit.
|
||||||
- State the next feature to work on.
|
- State the next feature to work on.
|
||||||
|
|
||||||
Current `master` HEAD: `5fce1405d4` (`recent-profile-identity` merged from
|
Current `master` HEAD: `79bb918bd62e9e9b8eab5d2bd1142e77343736e5`
|
||||||
`swarmforge-architect`; fast-forward). The records name the architect code
|
(`profile-last-post` merged from `swarmforge-architect`; fast-forward). The
|
||||||
review commit `7973e2d`; the only later commit `5fce140` is docs-only (records
|
records name the architect code review commit `ace7038`; the only later commit
|
||||||
+ summary), so the records are valid for the merged tree. This task adds a DB
|
`79bb918` adds only the records and summary, so the records are valid for the
|
||||||
join and a client column: `GET /profile/recent` now returns each profile's
|
merged tree. This task reorders `/profile/recent` by each profile's most recent
|
||||||
`name` (newest `0x6d01`, names store) and `profilePicUrl` (newest `0x6d0a`,
|
qualifying post (top-level `0x6d02` or topic message `0x6d0c`; replies `0x6d03`
|
||||||
profilePics store), both null when absent, via `ProfileQuery.getProfileIdentity`
|
and poll creations `0x6d10` do not qualify), drops profiles that have never
|
||||||
orchestrated by `ListRecentProfiles`; the client `/profile/recent` table gains
|
posted, and reports the last post's block/seen in each row. The indexer
|
||||||
a leftmost Account column showing the name and avatar, both linking to
|
maintains a `profileRecency` store and
|
||||||
`/profile/<addr>`, with truncated-address and jdenticon fallbacks. Client + DB.
|
`util/profiles/backfill-profile-recency.js` builds it idempotently,
|
||||||
Specs: `psf-memo-client/specs/recent-profile-display.feature` and
|
confirmed-only. Indexer + DB (no client code change; the client already renders
|
||||||
`psf-memo-db/specs/recent-profile-identity.feature`; records
|
the returned `blockHeight`/`seen`). Specs:
|
||||||
`docs/reviews/recent-profile-identity-verification.json` (client) and
|
`psf-memo-indexer/specs/profile-recency-indexing.feature`,
|
||||||
`docs/reviews/recent-profile-identity-db-verification.json` (db). The specifier
|
`psf-memo-db/specs/recent-profile-ordering.feature`, and
|
||||||
merged the branch and ran only the merged features' acceptance tests (client
|
`psf-memo-db/specs/backfill-profile-recency.feature`; records
|
||||||
7/7, db 3/3) as the independent check; soft Gherkin mutation 9/9 (db) and 10/10
|
`docs/reviews/profile-last-post-verification.json` (indexer) and
|
||||||
(client) killed; language mutation 12 killed / 0 survived. Architect summary:
|
`docs/reviews/profile-last-post-db-verification.json` (db). The specifier merged
|
||||||
|
the branch and ran only the merged features' acceptance tests (indexer 20/20,
|
||||||
|
db recent-profile-ordering 9/9, backfill 5/5, recent-profile-identity 3/3) as
|
||||||
|
the independent check. Architect summary:
|
||||||
|
`docs/reviews/profile-last-post-summary.md`.
|
||||||
|
|
||||||
|
Previous `master` HEAD before this merge: `5fce1405d4`
|
||||||
|
(`recent-profile-identity`; records name `7973e2d`, later `5fce140` docs-only).
|
||||||
|
That task added the DB display-name/avatar join and the client Account column:
|
||||||
|
`GET /profile/recent` returns each profile's `name` (newest `0x6d01`) and
|
||||||
|
`profilePicUrl` (newest `0x6d0a`), and the client table shows a leftmost
|
||||||
|
Account column linking to `/profile/<addr>`, with truncated-address and
|
||||||
|
jdenticon fallbacks. Specs: `psf-memo-client/specs/recent-profile-display.feature`
|
||||||
|
and `psf-memo-db/specs/recent-profile-identity.feature`. Architect summary:
|
||||||
`docs/reviews/recent-profile-identity-summary.md`.
|
`docs/reviews/recent-profile-identity-summary.md`.
|
||||||
|
|
||||||
Note: `master` also contains two earlier human commits made outside the swarm
|
Note: `master` also contains two earlier human commits made outside the swarm
|
||||||
|
|||||||
+28
-15
@@ -31,24 +31,37 @@ focus is **front-end improvements** to `psf-memo-client` (the React SPA).
|
|||||||
|
|
||||||
## In progress
|
## In progress
|
||||||
|
|
||||||
- **Profile ordering by last post (2026-09-20):** `/profile/recent` should
|
- None.
|
||||||
list only profiles that have posted, ordered by their most recent qualifying
|
|
||||||
post instead of their most recent profile update. A qualifying post is a
|
|
||||||
top-level post (`0x6d02`) or a topic message (`0x6d0c`); replies (`0x6d03`)
|
|
||||||
and poll creations (`0x6d10`) do not qualify. Profiles that have never posted
|
|
||||||
are dropped. Ordering is by last post's block height descending, then seen
|
|
||||||
descending, then address ascending, considering confirmed blocks only. The
|
|
||||||
Block and Seen columns report the last post's block height and timestamp
|
|
||||||
rather than the set-profile transaction's. The indexer maintains a
|
|
||||||
`profileRecency` index (mirroring `topicRecency`) so the read never scans
|
|
||||||
`addrPostHeights` or sorts every profile; a backfill builds it from existing
|
|
||||||
data. Indexer + DB (the client renders the returned block/seen unchanged).
|
|
||||||
Specs: `psf-memo-indexer/specs/profile-recency-indexing.feature`,
|
|
||||||
`psf-memo-db/specs/recent-profile-ordering.feature`,
|
|
||||||
`psf-memo-db/specs/backfill-profile-recency.feature`.
|
|
||||||
|
|
||||||
## Recently completed
|
## Recently completed
|
||||||
|
|
||||||
|
- **Profile ordering by last post (2026-09-20):** `/profile/recent` now lists
|
||||||
|
only profiles that have posted, ordered by their most recent qualifying post
|
||||||
|
(top-level `0x6d02` or topic message `0x6d0c`; replies `0x6d03` and poll
|
||||||
|
creations `0x6d10` do not qualify) instead of their most recent profile
|
||||||
|
update. Profiles that have never posted are dropped. Ordering is by last
|
||||||
|
post's block height descending, then seen descending, then address
|
||||||
|
ascending, considering confirmed blocks only (the mempool indexer records no
|
||||||
|
recency; the backfill ignores entries above `status.chainBlockHeight`). The
|
||||||
|
Block and Seen columns now report the last post's block height and timestamp
|
||||||
|
rather than the set-profile transaction's. The indexer maintains a
|
||||||
|
`profileRecency` store (mirroring `topicRecency`), and
|
||||||
|
`util/profiles/backfill-profile-recency.js` rebuilds it from existing data
|
||||||
|
idempotently. Indexer + DB (the client renders the returned block/seen
|
||||||
|
unchanged). Specs: `psf-memo-indexer/specs/profile-recency-indexing.feature`,
|
||||||
|
`psf-memo-db/specs/recent-profile-ordering.feature`,
|
||||||
|
`psf-memo-db/specs/backfill-profile-recency.feature`. Merged to `master` at
|
||||||
|
`79bb918` (fast-forward; review commit `ace7038`; the later `79bb918` commit
|
||||||
|
adds only the records and summary, so the records are valid for the merged
|
||||||
|
tree). Records: `docs/reviews/profile-last-post-verification.json` (indexer)
|
||||||
|
and `docs/reviews/profile-last-post-db-verification.json` (db). Independent
|
||||||
|
acceptance check after merge: indexer 20/20 examples, db
|
||||||
|
recent-profile-ordering 9/9, backfill 5/5, recent-profile-identity 3/3.
|
||||||
|
Architect summary: `docs/reviews/profile-last-post-summary.md`. Accepted
|
||||||
|
tradeoff: `profileRecency` is address-keyed for idempotent upsert, so the read
|
||||||
|
scans and sorts the whole recency index in memory (O(P log P)); the spec only
|
||||||
|
forbids scanning `addrPostHeights` or sorting every profile.
|
||||||
|
|
||||||
- **Recent profile identity (2026-09-20):** `/profile/recent` now shows a
|
- **Recent profile identity (2026-09-20):** `/profile/recent` now shows a
|
||||||
leftmost **Account** column with each profile's display name and avatar. The
|
leftmost **Account** column with each profile's display name and avatar. The
|
||||||
DB joins the `names` (newest `0x6d01`) and `profilePics` (newest `0x6d0a`)
|
DB joins the `names` (newest `0x6d01`) and `profilePics` (newest `0x6d0a`)
|
||||||
|
|||||||
Reference in New Issue
Block a user