Skip to content

chore(boards2): Make public API non-crossing again, move to main folder#5809

Open
jefft0 wants to merge 8 commits into
gnolang:masterfrom
jefft0:chore/boards2-hub-non-crossing-API
Open

chore(boards2): Make public API non-crossing again, move to main folder#5809
jefft0 wants to merge 8 commits into
gnolang:masterfrom
jefft0:chore/boards2-hub-non-crossing-API

Conversation

@jefft0

@jefft0 jefft0 commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

boards2/v1/hub has simplified structs and API queries for read-only access to boards2 data. But the interrealm changes in #5669 required adding cur realm to all the hub functions in order to authorize the calling realm. This made them crossing functions and not suitable for a query API. Therefore, we must give up the "hub" abstraction.

In general, this PR moves the simplified structs to p/gnoland/boards/exts/hub and the public API in hub.gno to the main folder.

  • Move the definitions of Board, Thread and Comment (and related tests) to p/gnoland/boards/exts/hub. Also move the local helper format.gno to there
  • Move the public API in hub.gno to the main folder. Access gBoards directly instead of GetBoard, etc. in protected.gno. Rename it's helper getThread to getBoardThread, and have it call the original getThread directly
  • Remove unused protected.gno . This includes GetRealmPermissions and GetBoard which check permissions (no longer supported). So remove the related filetests
  • Rename the tests in boards2/v1/hub/filetests from z_*.gno to z_hub_*.gno . Move them to boards2/v1/filetests
  • The hub folder is now empty, so remove it

TODO: Check if should remove ref *boards.Board from the Board struct, etc.
TODO: Confirm the updated header comment in hub.gno .

jefft0 added 6 commits June 11, 2026 13:52
…dsNS and realm param

Signed-off-by: Jeff Thompson <jeff@thefirst.org>
Signed-off-by: Jeff Thompson <jeff@thefirst.org>
…boards/exts/hub

Signed-off-by: Jeff Thompson <jeff@thefirst.org>
… parent folder

Signed-off-by: Jeff Thompson <jeff@thefirst.org>
…der.

Signed-off-by: Jeff Thompson <jeff@thefirst.org>
Signed-off-by: Jeff Thompson <jeff@thefirst.org>
@Gno2D2

Gno2D2 commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

🛠 PR Checks Summary

🔴 Pending initial approval by a review team member, or review from tech-staff

Manual Checks (for Reviewers):
  • IGNORE the bot requirements for this PR (force green CI check)
Read More

🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers.

✅ Automated Checks (for Contributors):

🟢 Maintainers must be able to edit this pull request (more info)
🔴 Pending initial approval by a review team member, or review from tech-staff

☑️ Contributor Actions:
  1. Fix any issues flagged by automated checks.
  2. Follow the Contributor Checklist to ensure your PR is ready for review.
    • Add new tests, or document why they are unnecessary.
    • Provide clear examples/screenshots, if necessary.
    • Update documentation, if required.
    • Ensure no breaking changes, or include BREAKING CHANGE notes.
    • Link related issues/PRs, where applicable.
☑️ Reviewer Actions:
  1. Complete manual checks for the PR, including the guidelines and additional checks if applicable.
📚 Resources:
Debug
Automated Checks
Maintainers must be able to edit this pull request (more info)

If

🟢 Condition met
└── 🟢 And
    ├── 🟢 The base branch matches this pattern: ^master$
    └── 🟢 The pull request was created from a fork (head branch repo: jefft0/gno)

Then

🟢 Requirement satisfied
└── 🟢 Maintainer can modify this pull request

Pending initial approval by a review team member, or review from tech-staff

If

🟢 Condition met
└── 🟢 And
    ├── 🟢 The base branch matches this pattern: ^master$
    └── 🟢 Not (🔴 Pull request author is a member of the team: tech-staff)

Then

🔴 Requirement not satisfied
└── 🔴 If
    ├── 🔴 Condition
    │   └── 🔴 Or
    │       ├── 🔴 At least one of these user(s) reviewed the pull request: [aronpark1007 davd-gzl jefft0 notJoon omarsy MikaelVallenet] (with state "APPROVED")
    │       ├── 🔴 At least 1 user(s) of the team tech-staff reviewed pull request
    │       └── 🔴 This pull request is a draft
    └── 🔴 Else
        └── 🔴 And
            ├── 🟢 This label is applied to pull request: review/triage-pending
            └── 🔴 On no pull request

Manual Checks
**IGNORE** the bot requirements for this PR (force green CI check)

If

🟢 Condition met
└── 🟢 On every pull request

Can be checked by

  • Any user with comment edit permission

@jefft0 jefft0 changed the title chore: boards2/v1/hub: Move types to p/gnoland/boards/exts/hub. Move API to main folder chore(boards2): Move hub types to p/gnoland/boards/exts/hub, and public API to main folder Jun 11, 2026
Signed-off-by: Jeff Thompson <jeff@thefirst.org>
@jefft0 jefft0 changed the title chore(boards2): Move hub types to p/gnoland/boards/exts/hub, and public API to main folder chore(boards2): Make hub API non-crossing again, move main folder Jun 11, 2026
@jefft0 jefft0 marked this pull request as ready for review June 11, 2026 14:28
@Gno2D2 Gno2D2 added the review/triage-pending PRs opened by external contributors that are waiting for the 1st review label Jun 11, 2026
@jefft0 jefft0 changed the title chore(boards2): Make hub API non-crossing again, move main folder chore(boards2): Make hub API non-crossing again, move to main folder Jun 11, 2026
@jefft0 jefft0 moved this to Other in review in 🤝🏻 Partner: Berty Jun 11, 2026
@jefft0 jefft0 changed the title chore(boards2): Make hub API non-crossing again, move to main folder chore(boards2): Make public API non-crossing again, move to main folder Jun 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🧾 package/realm Tag used for new Realms or Packages. review/triage-pending PRs opened by external contributors that are waiting for the 1st review

Projects

Status: Other in review

Development

Successfully merging this pull request may close these issues.

2 participants