feat: add org.hyperboards.board and org.hyperboards.contributor lexicons - #149
Conversation
🦋 Changeset detectedLatest commit: fea8132 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis PR introduces two new hyperboards lexicons: Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
Poem
Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 error, 3 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Pushed a review commit with the following improvements:
All checks pass (gen-api, lint, prettier, typecheck, build, 7/7 tests). |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@SCHEMAS.md`:
- Around line 461-465: Update ERD.puml to add the two new record entities
org.hyperboards.config and org.hyperboards.displayProfile and their structural
relationships: add org.hyperboards.config as a record that references activity
and collection via its subject field (subject should accept either activity or
collection) and add org.hyperboards.displayProfile as a record that references
contributorInformation via its contributorRef field; ensure both are represented
as entities (not cosmetic attributes) and link the relationships in the diagram
so the subject relationship points to activity and collection and contributorRef
points to contributorInformation.
ℹ️ Review info
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
.changeset/add-hyperboards-lexicons.mdSCHEMAS.mdlexicons/org/hyperboards/config.jsonlexicons/org/hyperboards/displayProfile.json
🚧 Files skipped from review as they are similar to previous changes (1)
- .changeset/add-hyperboards-lexicons.md
| ### `org.hyperboards.config` | ||
|
|
||
| **Description:** Configuration record for a hyperboard, wrapping an underlying activity or collection with visual presentation settings. Stored in the creator's PDS. | ||
|
|
||
| **Key:** `tid` |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check if ERD.puml exists and what entities/relationships it currently contains
if [ -f "ERD.puml" ]; then
echo "=== ERD.puml exists ==="
echo "--- Total lines ---"
wc -l ERD.puml
echo ""
echo "--- Checking for org.hyperboards references ---"
rg -n "hyperboards" ERD.puml || echo "No hyperboards references found"
echo ""
echo "--- Current entities in ERD.puml (sample) ---"
rg -n "^entity" ERD.puml | head -30
else
echo "ERD.puml not found in repository root"
fd -t f "ERD.puml"
fiRepository: hypercerts-org/hypercerts-lexicon
Length of output: 358
🏁 Script executed:
#!/bin/bash
# Check what org.hyperboards lexicons exist in the repository
echo "=== Looking for org.hyperboards lexicons ==="
fd "hyperboards" lexicons/ --type f --extension json
echo ""
echo "=== Content of hyperboards lexicons (if any exist) ==="
fd "hyperboards" lexicons/ --type f --extension json --exec cat {} \;Repository: hypercerts-org/hypercerts-lexicon
Length of output: 177
🏁 Script executed:
#!/bin/bash
# Check for references to activity, collection, contributorInformation in SCHEMAS.md around line 461
echo "=== SCHEMAS.md context around line 461 ==="
sed -n '455,475p' SCHEMAS.md
echo ""
echo "=== All org.hyperboards sections in SCHEMAS.md ==="
rg -A 5 "org\.hyperboards" SCHEMAS.mdRepository: hypercerts-org/hypercerts-lexicon
Length of output: 3599
🏁 Script executed:
#!/bin/bash
# Search more broadly for hyperboards in the entire repository
echo "=== All hyperboards files in repo ==="
fd "hyperboards" . --type f
echo ""
echo "=== Check for *.json files containing hyperboards ==="
rg "hyperboards" --type json -l
echo ""
echo "=== Check lexicons directory structure ==="
find lexicons -type d | head -20Repository: hypercerts-org/hypercerts-lexicon
Length of output: 613
🏁 Script executed:
#!/bin/bash
# Look at git status to understand what's being changed
echo "=== Recent git changes ==="
git status 2>/dev/null || echo "Git status not available"
echo ""
echo "=== Check if there are any staged hyperboards changes ==="
git diff --name-only 2>/dev/null | grep -i hyperboards || echo "No staged hyperboards changes in git diff"
echo ""
echo "=== List all files in lexicons/org ==="
find lexicons/org -type f -name "*.json" | sortRepository: hypercerts-org/hypercerts-lexicon
Length of output: 1119
🏁 Script executed:
#!/bin/bash
# Examine the actual hyperboards JSON files
echo "=== org.hyperboards.config.json ==="
cat lexicons/org/hyperboards/config.json
echo ""
echo "=== org.hyperboards.displayProfile.json ==="
cat lexicons/org/hyperboards/displayProfile.jsonRepository: hypercerts-org/hypercerts-lexicon
Length of output: 7625
🏁 Script executed:
#!/bin/bash
# Check the current structure of ERD.puml to understand what entities are documented
echo "=== All entities in ERD.puml ==="
rg '^entity' ERD.puml
echo ""
echo "=== Sample relationships in ERD.puml ==="
rg '\{.*\}' ERD.puml | grep -E '(one|many|^\|)' | head -20Repository: hypercerts-org/hypercerts-lexicon
Length of output: 241
🏁 Script executed:
#!/bin/bash
# Check if activity, collection, and contributorInformation are in ERD.puml
echo "=== Checking for hypercerts entities in ERD.puml ==="
rg "activity|collection|contributorInformation" ERD.puml -n
echo ""
echo "=== Full ERD.puml content ==="
cat ERD.pumlRepository: hypercerts-org/hypercerts-lexicon
Length of output: 8989
Update ERD.puml to include the two new org.hyperboards entities and their relationships.
The new org.hyperboards.config and org.hyperboards.displayProfile lexicons are missing from ERD.puml. org.hyperboards.config should reference both activity and collection (via the subject field which accepts either entity), and org.hyperboards.displayProfile should reference contributorInformation (via the contributorRef field). These are record-level entities with structural relationships, not cosmetic fields, and must be included in the diagram per the coding guidelines.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@SCHEMAS.md` around lines 461 - 465, Update ERD.puml to add the two new record
entities org.hyperboards.config and org.hyperboards.displayProfile and their
structural relationships: add org.hyperboards.config as a record that references
activity and collection via its subject field (subject should accept either
activity or collection) and add org.hyperboards.displayProfile as a record that
references contributorInformation via its contributorRef field; ensure both are
represented as entities (not cosmetic attributes) and link the relationships in
the diagram so the subject relationship points to activity and collection and
contributorRef points to contributorInformation.
811e5d0 to
542db0e
Compare
| @@ -0,0 +1,152 @@ | |||
| { | |||
| "lexicon": 1, | |||
| "id": "org.hyperboards.config", | |||
There was a problem hiding this comment.
Think this should be org.hyperboards.board
| "description": "Per-contributor presentation override within a specific board.", | ||
| "required": ["itemRef"], | ||
| "properties": { | ||
| "itemRef": { |
There was a problem hiding this comment.
identityOverride or just identity
aspiers
left a comment
There was a problem hiding this comment.
Some simple renames but otherwise good
- Rename board → config (org.hyperboards.config) - Rename contributor → displayProfile (org.hyperboards.displayProfile) - Use union [uri, smallImage] for image fields (project convention) - Change backgroundOpacity from decimal string to integer 0–100 - Replace circularImage boolean with imageShape knownValues in boardConfig - Make boardItem.itemRef a union supporting strongRef and contributorIdentity - Regenerate SCHEMAS.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Change key from tid to literal:self (one profile per user) - Drop contributorRef (owner is implicit from PDS) - Add displayName and image fields - Use union types for image fields (URI or blob) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add org.hypercerts.defs#smallVideo (video/mp4, video/webm, up to 20MB). Change videoUrl to video union (uri | smallVideo) in config and displayProfile. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Rename config.json to board.json (org.hyperboards.config → org.hyperboards.board) - Rename items → contributorOverrides, boardItem → contributorOverride - Rename itemRef → contributor Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Rename contributorOverride(s) → contributorDefault(s) to reflect fallback semantics - Add 'override' boolean field to control whether defaults take precedence over the contributor's own settings - Update all field descriptions to clarify default/fallback behavior Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
244d5ad to
895b884
Compare
|
Review commit pushed: naming improvements for ChangesRenames:
Updated descriptions:
RationaleThe previous names (
The descriptions were also simplified — the array-level description no longer tries to explain the All checks pass (gen-api, lint, prettier, typecheck, build, 7/7 tests). |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
Adds formal lexicon definitions for the two
org.hyperboards.*record types already in production in hyperboards-v2:org.hyperboards.board— the primary hyperboard record that wraps an activity/collection with visual presentation config (background, colors, aspect ratio) and per-contributor item overrides (display name, hover effects, video, links)org.hyperboards.contributor— contributor presentation defaults reusable across multiple boards (video, hover image/iframe, circular crop, link URL)Closes #148.
Design
Hyperboards is a presentation layer on top of hypercerts claim data. The namespace separation (
org.hyperboards.*vsorg.hypercerts.claim.*) cleanly distinguishes visual config from claim data:The board's
subjectfield is astrongRefto the activity/collection it visualizes. The board'sitems[]array contains per-contributor overrides keyed byitemRef(astrongReftocontributorInformation). This gives a 3-layer merge model:Schema Highlights
org.hyperboards.boardsubjectconfig#boardConfigitems#boardItem[]createdAtorg.hyperboards.contributorcontributorRefvideoUrlhoverImageUrlhoverIframeUrlcircularImageurlcreatedAtChecklist
npm run gen-api— types generated fororg/hyperboards/board.tsandorg/hyperboards/contributor.tsnpm run gen-schemas-md— SCHEMAS.md updatednpm run format— all formattednpm run check— lint, typecheck, build, 7/7 tests passSummary by CodeRabbit