Skip to content

docs(spec): document that marketplace seller filters by cryptoId (#231) - #272

Open
M3gA-Mind wants to merge 2 commits into
tinyhumansai:mainfrom
M3gA-Mind:fix/231-forsale-status-highcount
Open

docs(spec): document that marketplace seller filters by cryptoId (#231)#272
M3gA-Mind wants to merge 2 commits into
tinyhumansai:mainfrom
M3gA-Mind:fix/231-forsale-status-highcount

Conversation

@M3gA-Mind

@M3gA-Mind M3gA-Mind commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Documentation-only. Records GET /marketplace/identities as it actually behaves, so the identity-market re-implementation doesn't build on a contract the API doesn't honour.

Problem

website/public/spec/marketplace.md documents the browse seller parameter as "Filter by seller username". The live API matches the seller's cryptoId instead. A client that follows the spec gets count: 0 back — not an error — so a valid account reads as "nothing listed".

Reproduced against production on two different sellers:

Query count
?seller=CQNcpyeuAhGjxyuiStmmU4j8fiameGTdmV53dEoztLiz (cryptoId) 147
?seller=B721U8rP585FCMgmXr4hQPzUmD835Cju7evcfJXCY9b9 (cryptoId) 8
?seller=bestbot (username, per spec) 0
?seller=@bestbot (username with @) 0
?sellerCryptoId=<cryptoId> 166 — parameter ignored, response unfiltered

The sellerCryptoId spelling is the trap worth naming: it is silently dropped and the caller gets the entire marketplace back, which looks like one seller owning everything.

This is the contract behind #231. The handle overview there resolved each handle's for-sale badge out of a marketplace-wide feed capped at 100 rows rather than scoping to the viewer, so badges disappeared once the feed outgrew that window — 166 active listings today, 147 of them from the reporter. Full diagnosis in #231.

Solution

  • seller is documented as taking a cryptoId, with a note that a username matches nothing and that sellerCryptoId is not a parameter.

  • Adds limit / offset rows — both are honoured today (?limit=5 → 5 rows; ?offset=160 → the remaining 6 of 166) and were undocumented, yet any owner-scoped lookup needs them to page correctly.

  • Shows the correct call shape for "what has this account listed?":

    GET /marketplace/identities?seller=<cryptoId>&limit=100&offset=0
    

This documents the API as-built. Whether backend-tinyplace-v2 should also accept a username is a separate decision for the backend team — if it does, this note is the thing to update. Flagged on the issue.

Impact

Docs only — no code, no runtime, no build surface. website/public/spec/marketplace.md is served as reference content; nothing imports it.

Out of scope, flagged on the issue rather than fixed here: GET /marketplace/products currently returns 404 Route Not Found on backend-v2 while this spec documents it — the same spec/impl drift, but a backend call rather than a docs one.

Related

Summary by CodeRabbit

  • Documentation
    • Updated marketplace search documentation to clarify that seller requires a seller crypto ID.
    • Added documentation for limit and offset pagination parameters.
    • Clarified behavior for invalid usernames and incorrect seller ID queries.
    • Added an example showing scoped, paginated identity-listing searches.

…inyhumansai#231)

`GET /marketplace/identities?seller=` matches the seller's `cryptoId`, but the
spec advertised it as a username filter. A client following the spec gets an
empty list back — not an error — so the miss reads as "this account has nothing
listed". That is the shape of tinyhumansai#231: the handle overview resolved for-sale badges
out of a marketplace-wide feed instead of scoping to the viewer, and lost them
once the feed outgrew its page size.

Reproduced against production on two sellers: `?seller=<cryptoId>` returns 147
and 8 listings respectively, `?seller=bestbot` / `?seller=@bestbot` return 0, and
`?sellerCryptoId=<cryptoId>` is ignored outright — the response comes back
unfiltered, which is easy to misread as one seller owning the whole marketplace.

Also documents `limit` / `offset`, which the endpoint honours today and which any
owner-scoped listing lookup needs to page correctly.

This records the API as it behaves; whether the backend should also accept a
username is a separate call for the backend team.
@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

@M3gA-Mind is attempting to deploy a commit to the Vezures Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

M3gA-Mind has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

No new commits to review since the last review.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: cc874fc3-af1b-4f61-855c-65e4e7a40a57

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This change updates marketplace search documentation in two mirrored docs. It changes the documented seller filter from username to cryptoId, adds limit and offset, clarifies unsupported or mismatched query cases, and adds a paginated identity-listing example.

Changes

Marketplace search documentation

Layer / File(s) Summary
Search parameters and query examples
gitbooks/commerce/marketplace.md, website/public/spec/marketplace.md
The marketplace search parameter table now defines seller as a cryptoId filter. The docs add limit and offset, describe username mismatch and ignored sellerCryptoId queries, and include a scoped paginated identity-listing request example.

Estimated code review effort: 1 (Trivial) | ~4 minutes

Suggested reviewers: senamakel

Poem

I hopped through docs with careful feet,
And made the search notes clean and neat.
cryptoId now leads the way,
With paging set for every day.
Two mirrored burrows match just right. 🐇

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main documentation change: marketplace seller filtering uses cryptoId.

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4a43e94ff1

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

| `q` | Free-text search across names and descriptions |
| `category` | Filter by category |
| `tags` | Filter by tags (comma-separated) |
| `seller` | Filter by seller **`cryptoId`** — not the username. See the note below. |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Update the authoritative marketplace spec too

This changes only the served public copy, but gitbooks/commerce/marketplace.md still documents seller as filtering by seller username and lacks the new cryptoId/pagination warning. Since gitbooks/ is the authoritative product/protocol spec, clients reading the canonical docs will still implement username filtering and hit the same empty-result behavior this patch is meant to prevent; please update the GitBook source or sync the two copies together.

AGENTS.md reference: AGENTS.md:L122-L122

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 72bb2f24 — you're right, and the reason it mattered is worse than "two copies drifted".

On the generated-vs-authored question first, since it changes what the fix has to be. website/public/spec/ is not a build artifact of gitbooks/ — there is no generator. Nothing in package.json, the workflows, or scripts/ references public/spec, and the histories confirm it: the served tree was seeded once in ddabaaf1 ("add explore page with sidebar layout and spec docs") and has been touched since only by the repo-wide TinyVerse → TinyPlace rename in 4e9e69c3. gitbooks/commerce/marketplace.md has had six editorial passes in that window that the served copy never received. So the two are hand-maintained siblings, and hand-editing both is the correct fix rather than a workaround.

What changed. gitbooks/commerce/marketplace.md now carries the same seller correction, the same new limit / offset rows, and the same warning block. Those are byte-identical to the served copy — I diffed the region programmatically rather than by eye. The one remaining difference inside that table is sortBy, where gitbooks reads `price`, `rating`, `salesCount`, or `createdAt` and the served copy omits the "or". That is pre-existing stylistic drift, not something this change introduced, so I left it rather than silently tidying it inside a docs-correctness PR.

Wider drift, flagged rather than fixed. The two documents are not near-copies. They differ by ~300 lines out of ~210 each — different structure (10 headings vs 13), different prose throughout, and one genuinely substantive disagreement: the product-record example gives "network": "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp" in gitbooks and "network": "eip155:8453" in the served copy. Given 16f06b79 ("correct settlement to Solana-only"), the served copy looks like the stale one there too — but that is a settlement-contract question, not the seller filter this PR is about, and I am not going to resolve it from the outside inside a docs PR. Worth its own issue; happy to open one.

So: the seller contract now agrees across both copies, which is what your comment asked for. The rest of the divergence is real, larger than this PR, and now written down.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pushed as 72bb2f24, now the PR head. #272 touches both copies: gitbooks/commerce/marketplace.md and website/public/spec/marketplace.md.

Detail is in my reply above; the short version is that the seller row, the new limit / offset rows and the warning block are byte-identical across the two files, website/public/spec/ turned out not to be generated from gitbooks/ (no generator exists — the served tree was seeded once and has only been touched by a repo-wide rename since), and the wider ~300-line divergence between the two documents is flagged rather than silently fixed.

tinyhumansai#231)

Applies the same correction to the authoritative spec. AGENTS.md:122
names `gitbooks/` as authoritative for intended behavior, so a client
reading the canonical docs would still implement username filtering and
hit the empty-result behaviour this change exists to prevent.

The `seller` row, the new `limit` / `offset` rows and the warning block
are byte-identical to the served copy in `website/public/spec/`.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

M3gA-Mind has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.

@M3gA-Mind

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
⚠️ Action not completed

Already reviewed.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@gitbooks/commerce/marketplace.md`:
- Around line 163-165: Update the request code-fence opening at
gitbooks/commerce/marketplace.md lines 163-165 and
website/public/spec/marketplace.md lines 155-157 to use the http language
identifier, preserving the request examples unchanged.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f04d2583-11a3-4b8e-8940-a504a7b48360

📥 Commits

Reviewing files that changed from the base of the PR and between d254505 and 72bb2f2.

📒 Files selected for processing (2)
  • gitbooks/commerce/marketplace.md
  • website/public/spec/marketplace.md

Comment on lines +163 to +165
> ```
> GET /marketplace/identities?seller=<cryptoId>&limit=100&offset=0
> ```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Add a language identifier to both request examples.

markdownlint reports MD040 for both code fences. Use http so syntax renderers and the documentation lint configuration recognize the blocks.

  • gitbooks/commerce/marketplace.md#L163-L165: change the opening fence to ```http.
  • website/public/spec/marketplace.md#L155-L157: change the opening fence to ```http.
🧰 Tools
🪛 markdownlint-cli2 (0.23.2)

[warning] 163-163: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

📍 Affects 2 files
  • gitbooks/commerce/marketplace.md#L163-L165 (this comment)
  • website/public/spec/marketplace.md#L155-L157
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@gitbooks/commerce/marketplace.md` around lines 163 - 165, Update the request
code-fence opening at gitbooks/commerce/marketplace.md lines 163-165 and
website/public/spec/marketplace.md lines 155-157 to use the http language
identifier, preserving the request examples unchanged.

Source: Linters/SAST tools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant