Skip to content

Feat/threads author pages#3050

Open
HarshMN2345 wants to merge 6 commits into
mainfrom
feat/threads-author-pages
Open

Feat/threads author pages#3050
HarshMN2345 wants to merge 6 commits into
mainfrom
feat/threads-author-pages

Conversation

@HarshMN2345

Copy link
Copy Markdown
Member

What does this PR do?

(Provide a description of what this PR does.)

Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)

Related PRs and Issues

(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)

Have you read the Contributing Guidelines on issues?

(Write your answer here.)

@appwrite

appwrite Bot commented Jun 12, 2026

Copy link
Copy Markdown

Appwrite Website

Project ID: 69d7efb00023389e8d27

Sites (1)
Site Status Logs Preview QR
 website
69d7f2670014e24571ca
Ready Ready View Logs Preview URL QR Code

Website (appwrite/website)

Project ID: 684969cb000a2f6c0a02

Sites (1)
Site Status Logs Preview QR
 website
68496a17000f03d62013
Queued Queued View Logs Preview URL QR Code


Tip

Sites support three domain rule types: Active deployment, Git branch, and Redirect

@greptile-apps

greptile-apps Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds author profile pages for the Threads feature (/threads/authors/[id]), showing a Discord author's avatar, stats, roles, and their posted threads. It also adds "Resolved" badges to thread cards, reaction counts to message cards, author profile links in message cards, and a formatGroup utility for the docs references sidebar.

  • New DiscordAuthor type and getAuthor/getAuthorThreads helpers power the server load function; the page correctly shows a "Showing X of Y" indicator when threads are truncated at 25.
  • The mongo sprite symbol was deleted while 'mongo' was simultaneously added to IconType, leaving the type union inconsistent with the sprite.
  • server.allowedHosts: true was committed to vite.config.ts, and the new persons sprite symbol was registered as zzz-persons rather than persons.

Confidence Score: 4/5

The author pages feature itself is solid, but the icon changes introduce a contradictory state between the type definitions and the sprite that should be resolved before merge.

The IconType union now declares 'mongo' as a valid icon while the sprite that backs it was deleted in the same PR. Any component passing icon="mongo" will silently render nothing. No existing call site currently uses it, but the inconsistency is a real defect in the icon subsystem introduced by this change.

src/lib/components/ui/icon/types.ts and src/lib/components/ui/icon/sprite/sprite.svelte need to be reconciled — the mongo entry should either be restored in the sprite or removed from the type union.

Important Files Changed

Filename Overview
src/lib/components/ui/icon/types.ts Adds 'mongo' to IconType, but the corresponding sprite symbol was removed in the same PR — type and sprite are now out of sync.
src/lib/components/ui/icon/sprite/sprite.svelte Removes the mongo symbol and adds a persons icon, but the new symbol is registered as zzz-persons instead of persons, which is non-standard.
vite.config.ts Adds server.allowedHosts: true, disabling Vite's host-header check for all developers — likely a convenience setting that should not be committed.
src/routes/threads/authors/[id]/+page.server.ts New server load function for author pages; getAuthorThreads errors propagate unhandled (previously flagged).
src/routes/threads/authors/[id]/+page.svelte New author profile page with avatar, stats, roles, and paginated thread list; includes all required meta tags and a 'Showing X of Y' indicator.
src/routes/threads/helpers.ts Adds getAuthor and getAuthorThreads; getAuthor still uses the hardcoded string 'authors' as the collection ID (previously flagged).
src/routes/threads/types.ts Adds DiscordAuthor interface and extends existing types with optional fields; straightforward and well-typed.
src/routes/threads/[id]/MessageCard.svelte Adds author profile links and reaction count display; falls back gracefully when author_id is absent.
src/routes/threads/ThreadCard.svelte Adds a 'Resolved' badge before tag chips when thread.is_resolved is true.
src/routes/docs/references/[version]/[platform]/[service]/+page.svelte Adds formatGroup to insert spaces before uppercase letters in group names; simple and correct.

Reviews (4): Last reviewed commit: "Fix icon font ordering: use inline SVG f..." | Re-trigger Greptile

Comment thread src/routes/threads/helpers.ts Outdated
Comment thread src/routes/threads/authors/[id]/+page.server.ts
Comment thread src/routes/threads/authors/[id]/+page.svelte
Comment thread src/routes/threads/authors/[id]/+page.svelte
Comment on lines +11 to +15
return (await databases.getDocument(
PUBLIC_APPWRITE_DB_MAIN_ID,
'authors',
discordId
)) as unknown as DiscordAuthor;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 PUBLIC_APPWRITE_COL_AUTHORS_ID env var added but never consumed

PUBLIC_APPWRITE_COL_AUTHORS_ID is documented in .env.example, but getAuthor still passes the literal string 'authors' as the collection ID. In any environment where the actual Appwrite collection is not named exactly "authors", every request to /threads/authors/[id] will throw a 404/collection-not-found error from Appwrite. The fix is to import PUBLIC_APPWRITE_COL_AUTHORS_ID from $env/static/public and use it here, matching the pattern used for PUBLIC_APPWRITE_COL_THREADS_ID and PUBLIC_APPWRITE_COL_MESSAGES_ID.

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