Repository navigation
feat(ui): add lore entity CRUD frontend - #18
KareemN1936 wants to merge 1 commit into
Conversation
|
Vercel preview is ready: https://hivelore-orm8efqbh-kareemn1936s-projects.vercel.app Commit: 5eb40d2 |
|
@KareemN1936 the frontend craft here is good — clean component split, no mocks, no secrets, no hardcoded URLs, correct race handling in the fetch effect (the 🔴 1. Stored XSS — fix this first, independent of the rest. <div className="prose-text max-w-none" dangerouslySetInnerHTML={{ __html: body }} />
It chains, too: the access token lives in 🔴 2. The backend doesn't exist — this is a sequencing problem, not a "stop working" one. You've also unilaterally defined the API contract — response shapes ( You're the right person to write that backend — you built the indexer and the Hive integration layer. So the ask isn't to drop this; it's to land it in the right order:
🔴 3. No permission gating — and it fails open. 🔴 4. Drafts leak to anonymous readers. 🔴 5. A user can self-publish to canon. 🟠 6. Two of the six card types are unfilterable. Nits: no client-side validation mirroring the backend's caps (100 KB body, 200-char title, 1,000-char summary) so a long entry is silently accepted then rejected, losing the user's work; Also worth naming: this is your second PR stacked on an unmerged branch — #18 → #16 → #14, and #14 is stalled with open review items. If Perla reworks the hub or contributions shape, both of your PRs need rebasing. Worth pausing new stacked work until #14 lands. |
|
Agreed, thanks for the detailed review. I’ll pause this UI PR and split the backend contract out first. Plan:
|
|
@KareemN1936 first — you said you'd pause this one and split the backend out, and you did exactly that (#19). That was the right call and I want to acknowledge it before the rest. But to be clear about the state: no code has changed on this branch. The 08-08 activity was a comment, not a commit — head is still Please mark this PR as a draft so it stops presenting as merge-ready with a Fix the XSS now, independently of the rebase — There's now an extra reason to drop Two ordering problems you'll hit, worth knowing before you start:
In the same pass, the still-open items:
Nits: client-side caps mirroring #19's 100 KB / 200 / 1000 limits; delete confirmation; search debounce; |
|
@mcfarhat Keeping this PR open only as the base branch for stacked PR #21. Do not merge #18 by itself. The CRUD UI/API work has been superseded by the integrated PR #21, which carries this frontend work, the lore CRUD API, relationship linking, and the latest review fixes. Review should continue on #21. |
|
Closing this — its work is fully carried by #21, so nothing is lost. Verified before closing: this branch's head Two reasons to close rather than leave it open:
The branch itself is NOT deleted — #21 is still based on it, so the ref stays until #21 is rebased. What happens next with #21 — and it isn't a retargetI looked at simply retargeting #21 at Retargeting would land that stale copy on So the order is:
So: rebase, not retarget, and after #14 lands. Nothing for you to do on this right now beyond the #21 fixes already on that review — the two small ones ( |
Summary
Validation
Notes
Frontend is wired to expected lore CRUD endpoints. Current remotes show LoreEntry schema/foundation, but I do not see exposed backend CRUD routes yet.