#Next.js Discord Forum Discussion
1 messages ยท Page 1 of 1 (latest)
Post for testing it: https://discord.com/channels/752553802359505017/1117227012701032569
@robust garden regarding the linked table, it could indeed be a good idea for profile pages, but for the ranking of answers I think it would still end up with a large number of rows read because we would need to compute it for every user instead of just using a backward index
we still have the answerId in the post table so if we ever need to add new features, we can populate new tables from our current data
Yeah, i kinda came to the same consensus (as you could tell)
also what happens when you run out of planetscale usage? slow queries?
no idea, tbh I thought they would just shut it down
i also think to continue with efficiency, add a lastmod to posts to negate the extra querying involved + also better sorting for active (to copy discord on home) kinda taking about also: #discord-feedback message
...nice i was kinda scared if it would just... die
they got incredibly lenient, I used almost 10x more the free quota
I should've waited for the fix after it reached 10b
yeah this is a good idea, it would speed up the sitemap too
Sorry for the slowish reply, but I wanted to make sure it is my full reasoning behind the more overly advanced approach: https://github.com/rafaelalmeidatk/nextjs-forum/pull/51#issuecomment-1632699894
(and one again sorry if im taking up your time with this - there is probably better things you could be doing then this..., and also again thank you for making this site and letting me contrubute to it ๐ )
don't worry I appreciate the contributions, I am just busy atm so I am kinda slow to reply because I want to take the time to think more about it
@robust garden sorry for the delay, your PR looks good. I left a final review because of unstable_cache and we can merge it ๐
๐ i kinda did think it was overkill, and will fix this now
fixed now
i think my fix conflicting change didn't mess things up
and the other reason for using custom regex (not from the package) was because of how unsuported it is (ie lots of new features aren't there) - making it easier to change to new platform
and sorry for over complicating a basic change
no worries, you brought good points
How many double ups of the random non-public name in this server and could it be worthwhile checking the db if user already exists and change salt or something? #discord-feedback message (611000252438413342 and 141252432054190080 seem to return same name)
and i think there should be a fallback image (the default one) for when the user changed the avatar but the bot somehow doesn't know... https://nextjs-forum.com/post/1117227012701032569 (and possibly if the user leaves the server, make them to private)
no matter how big we make the seed the issue would still happen since the issue is the number of options. even with millions of options we could still end up with two different users having the same name, although it would be rare
oh good ideas, we indeed need to change them to private on server leave
I was just wondering if it is just one case, or if many have the same name (which can confuse people)
well actually if they gave permission to show the data I am not sure changing it back to private is expected, otherwise they would be required to say on the server to have their name public in the forum
Well, they technically loose the role...
yeah thats true 
It would also be weared if they join the server, and that is when they make it private (because of the member role)
lets play safe and make them private as you suggested
@sharp python another thing I have been wondering for some time is, how much ram is the bot using because it can be lowered with less caching (or using discordjs/core as you don't need much)
300mb fine as you can only really get it down to 50mb (with some horrible optimisations)
Yeah, I just didn't know how well it was with this big server
Is there a reason that LayoutWithSidebar isn't just used/defined in a layout file (opposed to used in each page)
I'm assuming it could be from when you used pages dir first...
I like the new locking feature, however when a post gets locked, you seem loose notifications, so I think it should also DM the user saying that their post has been locked/removed to encourage them to make a better post...
At least this is what has happened to me when I participated in a thread that got locked (the locking message didn't get sent to me)
are you sure it was not closed instead of locked?
I tested here with another account and I received the notification
Hmm that's a good question
Ill test soon
I forgot that there is that there is just locking now
I remember an user closed a thread and it indeed vanished from my list, I didn't know what happened until I searched for it so I could see the last message
Yeah, that's what I'm worried by
But I think it should be good now (if you only locking) edit: just cheded docs and yeah locking and archiving are different
Well, how about the bot pings the user in the locking message (so that they can know insead of thinking it got ignored)
ah well if they try to send any messages in the post they will notice it is locked and see the latest message, the ping will also be there so they will check
I'm basically trying to not draw too much attention to the user itself since if you are new to discord it might seem a bit intimidating
so just the lock message without directing it to anymone is more neutral
Yeah i understand the issues and kinda forgot about being a new user to discord
But thanks for always answering my questions ๐
is there a way for google to actually use useful content (ie the LD+JSON) instead of this...
uh what happened here 
There was a apost but not any replies, so it may have been confused. I was wondering if there is a way to guide google to not look at some sections of the page...
@sharp python is there a reason that this post is 404ing for the web version #1143660588308889621 message
is it in the db?
its the only one also ๐ญ
ahh i think it is because the message was longer then the schema allowed for: https://github.com/rafaelalmeidatk/nextjs-forum/blob/main/packages/db/migrations/0-initial.ts#L79
1,836 characters (idk what the first non-edited one was) and the default character limit
but the limit seems to be 65,535, so ig you can look into this later ๐ (maybe looking at bot logs) - and nitro limit is 4,000
good idea, good night 
so i think i either worked out the issue or another bug:
- I put 10 files as attachments (not very small but not too large)
- bot error:
Failed to create thread: DiscordAPIError[40058]: Cannot message this thread until after the post author has sent an initial message.
I think the thread creation time occurred earlier then the message as it was still uploading my many files.
and apparently its a known issue: https://github.com/discord/discord-api-docs/issues/6340 (so it could be fixed soon with the best temporary solution is to retry the message 30s or so later)
(umm idk why i thought that could that issue because the initial message did get sent)
Sorry to bug, but did you end up finding out what occured?
no
tbh I am kinda tired lately
burning myself out with my work job and a complex side project
so when I am not doing these 2 things I am too tired to work on other stuff

๐ญ i understand that, I hope you get better soon
ahh it happend again (idk if there were more): #1147471036514848849 message
now that i think about this... as the message doesn't get generated as fast sometimes, it may be having nothing to send to the db, thus thread exists but not message for that
ever thought of registering nextjs.forum?
and using a subdomain for faqs like faq.nextjs.forum
it's available and it costs $20 a year
might need to ask for permission to the team at Next tho
ask vercel for subdomains on nextjs.org (forum.nextjs.org)
that would be a nuke solution compared to having a completely different domain easy to type and remember 
it would low-key imply a stronger endorsement by Next.js as an organisation while still keeping it separate from the org itself
I like short memorable and intuitive domains, and Google does too
tbh i would say its cool, but id prefer the .com and use the .forum as redirect (but thats imo)
yeah, but then you would have to put faqs on a separate subdomain and I'm not sure it would be ideal since joulev's site is strictly related to the forum
i wouldn't say that joulevs site isnt that related to the forums... yeah it is made for it, but it can be used for way more than that (ie google and such), so it kinda sounds better as another one... having the end of forums can imply its only useful for forums...
mh, yeah... I can see how the associations could be made
hmmm, i think we should stop going through each post's message to see last mod...

i think that might have been something weird... now its slightly better... but still shouldn't go through every message
@sharp python what would be the best way on adding a lastmod row to the table... set the default to now and make everything modified... or make a script to set it to do the same query as sitemap does for lastmod... (and if script should it be done in the migration file...)
hmm should i call it lastActive instead of lastMod
do we already have a createdAt column? it could be updatedAt
then we set it to new Date() every time it should be marked as "modified"
we have createdAt and modifiedAt (for edits i think) for posts
thats what i was thinking
but for initial migration data is what im wondering
(and if script should it be done in the migration file...)
that's a good question, I don't really know if we can do data migrations in the migration file because planet scale does not replicate the data on migration branches so it would have no effect
this seems to work (just copyed code from sitemap)
import { Kysely, sql } from 'kysely'
import { DB } from '../schema'
export async function up(db: Kysely<DB>): Promise<void> {
await db.schema
.alterTable('posts')
.addColumn('lastActive', 'datetime', (col) => col.notNull().defaultTo(sql`now()`))
.execute()
// update posts with lastmod time
const posts = await db
.selectFrom('posts')
.select([
'posts.snowflakeId',
sql<Date>`MAX(IFNULL(posts.editedAt, posts.createdAt))`.as('lastModTime'),
sql<Date>`MAX(IFNULL(messages.editedAt, messages.createdAt))`.as(
'lastMessageModTime',
),
])
.leftJoin('messages', 'posts.snowflakeId', 'messages.postId')
.groupBy('posts.snowflakeId')
.execute()
for (const post of posts) {
const lastActive = post.lastMessageModTime > post.lastModTime ? post.lastMessageModTime : post.lastModTime
db
.updateTable('posts')
.where('posts.snowflakeId', '=', post.snowflakeId)
.set({ lastActive })
.execute()
}
}
export async function down(db: Kysely<DB>): Promise<void> {
await db.schema.alterTable('posts').dropColumn('lastActive').execute()
}
(idk it its a good practice thing to do tho)
the last time I had to do a migration of this kind (for the number of answer for the members) I added a bot command 
yeah so the problem is that the migration on production doesn't run on the normal database
it runs on a replication that doesn't have any data
o.O i didn't consider that
I was meant to search about it to figure out how people were doing data migrations with planetscale but I didn't get to find a solution
hmm ig ill make another command... should i make one for both (refresh data), or have 2 separate (probibly better)
yeah you can make another command and we delete it afterwards
hmm let me check the code ๐ค
i am proposing lastActive because it makes more sense in the name
export interface Posts {
//...
createdAt: Date
lastActive: Date // i added
editedAt: Date | null
ok so we have editedAt for post edits and it looks like we are already using it but we need another field
yeah active sounds like a good name
I would just add the sufix so we know its a date: lastActiveAt
ahh good idea
*I didn't look at the others for examples to template of ๐ญ *
is this code fine... or should i work out how to to do it like your other one... (idk about how to use the lastedit or new message - or if it is even necessary)
// update posts with lastmod time
const posts = await db
.selectFrom('posts')
.select([
'posts.snowflakeId',
sql<Date>`MAX(IFNULL(posts.editedAt, posts.createdAt))`.as('lastModTime'),
sql<Date>`MAX(IFNULL(messages.editedAt, messages.createdAt))`.as(
'lastMessageModTime',
),
])
.leftJoin('messages', 'posts.snowflakeId', 'messages.postId')
.groupBy('posts.snowflakeId')
.execute()
for (const post of posts) {
const lastActive = post.lastMessageModTime > post.lastModTime ? post.lastMessageModTime : post.lastModTime
db
.updateTable('posts')
.where('posts.snowflakeId', '=', post.snowflakeId)
.set({ lastActiveAt: lastActive })
.execute()
}
await db
.updateTable('users')
.set({
answersCount: (eb) =>
eb
.selectFrom('posts')
.select(eb.fn.countAll<number>().as('count'))
.innerJoin('messages', (join) =>
join
.onRef('messages.snowflakeId', '=', 'posts.answerId')
.onRef('messages.userId', '=', 'users.snowflakeId'),
),
})
.execute()
I think we have too many posts for the first alternative to work
let me check
hmm 6k
I think it's not that much to load in the memory
it should be fine as this is an one-off thing
well its 6k but only 2 dates...
hmm do you want me to try and be fancier...
ill try and see ๐
I mean if you want to try, go ahead
but we can use the first version w/o issues
the only tricky part of converting it into a single query would be the conditional of picking the highest edit time from the two selected columns
its a learning experience... and if it doesn't work, then ill just revert :)
I would do this with a CTE in postgres, but I don't think vitess supports CTEs
tbh i don't think i have ever seen an edited message after a message send...
(it was more a cool thing, but idk now... ill still update it from the bot)
yeah its a very edge case that its not a big deal
if you come up with a query that only uses the message time we can use it as well
wait is there always a message in the post...
thats what i just realised
I think the post content is a message 
if it gets deleted
yeah I am pretty sure it is
if it is deleted you can use the current time
or the post creation time
should later fix this by deleting if no replies like one if the gh issues
but does this weird query of checking all messages work for this...
idk if its worth this madness of a query
(it already seems chaotic for me)
it would be a left join with the messages, get the max value for the message's last modification (messages.editedAt or messages.createdAt, decided by the ifnull) then using coalesce to pick it or the post's creation date
doesn't mysql use IFNULL (at least that is what i used for prev query..) - wait they are doing diferent things
tbh I don't really remember why I used ifnull instead of coalesce 
i think i did it tbh
ah in this case where we only have 2 values it is basically the same thing but with a different name
its 5:17 AM here so I gtg, if you have any questions you can ask and I will try to reply tomorrow

ahh enjoy your sleep ๐
https://github.com/rafaelalmeidatk/nextjs-forum/pull/66
I just gave up trying to do the fancy query ๐ญ
ah its ok! I will give it a look tomorrow, thanks a ton!
@robust garden fwiw I did some very small updates to the code: https://github.com/rafaelalmeidatk/nextjs-forum/commit/5ed5fb79c0aa3e5b6bcde98108d70aab3b659bb2 and https://github.com/rafaelalmeidatk/nextjs-forum/commit/4c1fab9b1bf9a9fa0e5374492fe5f5b34a6b9be2
I was gonna comment on the PR but I wanted to get this merged asap to reduce the load on the db
Yeah that's fine 
btw the refresh command didnt work
๐ญ
it was firing too many queries so it introduced problems with the locks
I will give it a look later on but I think the easiest solution is just adding a delay between each update command
Ig complex query is the best method
alternatively, we can also create a single query to update the rows
instead of trying to select the data and updating in a single query
I mean it isn't too bad having a all dates as now fo google (as they won't do too many queries anyway)
yeah that's why I am not too worried about it
but the interval might be the best
we are gonna remove the command after this is done anyway
Yeah sounds good
the only downside is that it is probably gonna take like 10+ minutes
but this is fine
I forgot that certain things kinda need optimisations for large db
yeah that's annoying
tbh planetscale makes it much worse
the read limit is very bad
So platenscale doesn't like that many writes in a short time
ah writes is fine
let me show you
we dont use even 1% of monthly writes
the only problem was that the queries itself were being fired too fast for the db driver to keep up I guess
but surly the sitemap didn't cause most of that
and i prob shouldn't have initially created such a bad query
im amazed that there aren't many repercussions for this usage 
tbh I have no idea why the reads is this high 
it looks like there are some very old deploys of vercel that are still triggering the old expensive query that I wrote when I started the project
yeah...
(thats 1 query)
surly we get rid of alt text for images...
@sharp python just wondering if we need the custom sitemap or if the nextjs version is good enough (i haven't checked if revalidate works, but i would assume it does) - even though it is just a fancy version of doing the same thing, i feel like it could be easier to understand... (only issue i can see is when 50k results as they don't support multiple)
so... it seems like i can't make it dynamic... like it only does it at build time... (tried making export const revalidate = 0 (and higher like 10) and export const dynamic = 'force-dynamic'... i may need to see if i can use realidatePath, but that kinda removes the whole point of revalidate cache... (can scam with cron, but seems excessive with a solution currently anyway)
hmm i can't even revalidate it
https://github.com/rafaelalmeidatk/nextjs-forum/compare/main...RiskyMH:nextjs-forum:nextjs-sitemap i still did it anyway... but i can't see any way of making it dynamic (should i actually open a pr tho)
o.O it may work when: https://github.com/vercel/next.js/pull/56007
oh cool we can merge the pr when this is fixed
๐ค i haven't tested, just hoping based on its description
also that might mean going into canary version... is that fine? or should wait for stable?
yeah its fine
and can i update all the other deps while im at it
not in the same pr 
good
but they will be later... as one was just complaing that it wasn't updated...
@nextjs-forum/web:build: Browserslist: caniuse-lite is outdated. Please run:
@nextjs-forum/web:build: npx update-browserslist-db@latest
@nextjs-forum/web:build: Why you should do it regularly: https://github.com/browserslist/update-db#readme
lol that isn't even a direct dep anyway
This was merged before both canary versions... Is it included just not in changelog?
๐ฆ
warning "next > styled-jsx@5.1.1" has unmet peer dependency "react@>= 16.8.0 || 17.x.x || ^18.0.0-0". warning " > next@13.5.4-canary.4" has unmet peer dependency "react@^18.2.0". warning " > next@13.5.4-canary.4" has unmet peer dependency "react-dom@^18.2.0".
yay! It fixed it: https://github.com/rafaelalmeidatk/nextjs-forum/pull/68
ooh nice!
will this affect the bot storing attachments? (as the urls now expire)
yeah rhys warned me about it, I will try to implement something with vercel blob
would this break: https://github.com/rafaelalmeidatk/nextjs-forum/blob/main/apps/bot/index.ts#L93C19-L93C107 (and the #welcome image?)
https://discord.com/channels/752553802359505017/1164979384361422858 shows as deleted msges but they are there ๐ญ https://nextjs-forum.com/post/1164979384361422858
Next.js Discord Forum
And ones where it never sends initial reply ๐ญ #1164967093255536640 message
uh this is weird ๐ค
It's been happening occasionally
Kinda weird... Not enough often to test, but enough to see ๐ญ
๐ซ
but this shouldn't get too costly with all the uploads (or could vercel be nice and pay for it) - actually it surly won't get more than 10gb (if you have pro)
I will check with lee if they can sponsor the project so we dont have to worry about it
and then im gussing vercel postgres so we don't need planetscale
and hopefully a nextjs.org subdomain
hmm ๐ค
thats a good idea but I'm not sure its worth the switch
prob not, but we won't have the reads issue ๐
instead we have scarier pricing with vercel pg ๐ญ
but if your paying for it, then might as well use the upstream provider for better price: https://service-markup.vercel.app/
@sharp python poor nextjs forum bot is down or at least not responding to cmds or sending new msgs ๐ญ (your probably sleeping tho)
wait actually, the new posts are in the ui, but not responding on discord... hmm...
ok its fixed now ๐ (you don't need to worry unless you can find out why it dies for some time)
oh great
I will check the logs
nothing in the logs at the timestamp you sent the message
๐ค
it crashed a few times later
but it recovered shortly after
hmmm
it occured before i send msg (but that was when i verified it didn't work)
maybe discord was being a little weird ๐ญ
ig there is nothing we can do if it occures again
as the issue is sending the responses (as the websoket seemed to work)
hmmm it was a little delayed #1167589743261917194 message
lol a lot of the recent ones have this
im thinking it could be discord telling the bot weird ratelimit headers as d.js respects them and waits for new requests
but it could also be lag... idk
there is no errors, so not easy to tell
the good thing is that it still indexes the new messages ๐
You have to at least the 15 December... So plenty of time in theory #697138785317814292 message
Well it is there but not enforced yet
I asked lee about vercel blob but he didn't reply yet, I think I will send another message
then move to s3 if I don't get any replies
What about R2... They seem to have good pricing too
What is one way of thinking about it 
*that
I engaged with a new project so I forget about the previous ones ๐ญ
ahh it didn't send initial message again #1170893184801448069 message
me not know why
a few mins later it worked in diferent thread: #1170896628329218119 message
and hour earlier worked too #1170885775974469732 message
hmm yesterday it didn't work either #1170666213429485588 message
but on more positive news... google is grouping things ๐
@sharp python just wondering, as bun seems to be stable now, do you think we could try it with the forum bot and maybe improve speeds (I'm not sure how well it will work with larger bot tho), or would you like to wait for better windoes support before
Or... Just use node as it works?
Mainly asking as it works alot better for me than tsnode than windows... (Even though I am using wsl)
we can still use pnpm as package manager also :)
if this means we can remove the nodemon and ts-node stuff that would be great
but node is way more stable as we don't need to worry about subtle bugs
and I am pretty sure speed isn't a concern for us
Yeah I only suggested as nodemon and tsnode hasn't ever worked well for me in windows
And using bun in wsl improved everything (as no build and things not as death)
Yeah that is the main issue, I feel like it is better, but I do hear about the occasional issue ๐ฆ (it is at least better in Dev maybe not in prod)
@sharp python before i try, would you think making the "most helpful" a suspense query could be useful (and then make a skeleton for loading) - im thinking that it isn't as nessary to show so can be a little less required
hmmm why not
I would be curious to know if that would speed up the initial rendering
so am i
im just testing the look, and then ill make PR so we can see on prod
is this good enough? #off-topic message
@sharp python can you approve vercel bot ๐ https://github.com/rafaelalmeidatk/nextjs-forum/pull/73
sure
hmmm it seems like the query is so fast and so much caching (from browse homepage and min revalidate), it doesn't do too much
does it show the loader locally?
yeah i see it, but for such a small time
yeah I think the query is cached ๐ค so it wouldn't do much here
the query itself isn't cached
but it kinda takes the same time as the rest of queries
and i tested localy my forcing the MostHelpful function to wait a few secs
im not too suprised that it is so fast, but on the off chance it is waiting for most helpful, it may be useful to make it unblocking
hm yeah I like the effect but I am not sure it will be really useful in production, this query is now using an index so it is insanely fast
to be clear, I almost always advocate to have the least amount of code possible for the best results, and adding this extra code (albeit small, is still code that would need to be maintained) doesn't seem much justifiable
that's the only reason, otherwise I would accept it because it looks cool
yeah, i can't get it to ever show it (even in uncached pages), so it isn't good for maintainability
but i just wanted to test on prod because bigger size then my local test (+on vercel so diferent speed) ๐
yeah that was a cool test
ill close it as not really mergable, but if it becomes useful, we can always copy the code back ๐
btw thank you for allowing me to try this 
np, thanks for the pr 
๐ญ another post that wasn't replied to #1172965833430024253 message
this bug is so random ๐ญ
at this point im just putting them here to see if any correlation, but its to random ๐ญ
ahhh why it overflow width https://nextjs-forum.com/post/1173893873668472832
Next.js Discord Forum
next.config.js file -/ @type {import('next').NextConfig} */const nextConfig = { images: { domains: ['tailwindui.com'], remotePatterns: [ { protocol: 'https', hostname: 'unsโฆ
...another #1174125343423070331 message
also 1 month left of current embed thingy (as 15 dec)
seems like something with the answered section (if i remove that in dev tools, it doesn't overflow)
yeah it's the answer 
for some reason the codeblock is going over the parent's width
but the other codeblock in the actual replies is working normaly
now the question is how to solve as i thought they effectively use the same code
๐ no bot again #1175367700650930216 message
@sharp python would it be possible for you to have a look at my pr for better markdown, even if it is just to enable vercel preview so i can see if it breaks everything (kinda hard to copy and paste everything into private server than just accessing it on ui) - but its fine if it needs more time to look at as more chaotic (and if you have other more important things)
@robust garden sure, sorry for the delay
so its the lists that basicly die... everything else works... (if they are changing type without new line)
should i disable it or is it fine...
#1117227012701032569 message https://nextjs-forum-web-git-fork-riskymh-update-e0aad6-rafaelalmeidatk.vercel.app/post/1117227012701032569#message-1177531818027790358
Next.js Discord Forum
This is a test of the new web indexer for the Next.js Discord server.
and in this post it kinda removes some whitespace padding... (but nothing else is changed, so it may be fine) #1178083994181582949 message https://nextjs-forum-web-git-fork-riskymh-update-e0aad6-rafaelalmeidatk.vercel.app/post/1178083994181582949
Next.js Discord Forum
Hi, I'm new to NextJS, and I'm trying to follow this guide (written for NextJS 13) to set up react-query: https://tanstack.com/query/v4/docs/react/guides/ssr#using-the-app-directory-in-nextjs-13However, importing anything from 'reโฆ
to have better support, i am assuming it needs to not care about blank lines and use indenting for actually indenting the list
i just have to copy this and override it more: https://github.com/Khan/perseus/blob/main/packages/simple-markdown/src/index.ts#L1067-L1197
or... just disable as 1./ *. in text isn't too bad
also btw i removed the override in the pr as i couldn't get it to change anything (but both ways yielded the peer dep warning)
I am not sure about this list, it looks a bit buggy
but it might be in conformation with the md spec?
let me check
yeah github does the same
I would prefer the markdown to be the same as discord but I feel this is an edge case so its fine
Yeah that's kinda the issue... But my regex skills aren't good enough to fix it, but I think removing is a fix too
Also, should I bundle the simple-msrkdown to not make it a dep ๐
but in theory, all this should do is parse the line (like heading), strip the front + see if it should be indented (like x spaces), and then return (and make it less fancy compared to current
personally, i kinda feel like the "official browser list formatting" isn't that important, and the text still conveys the same message, so i just disabled it for the time being... i spent ages trying to fix it, but their regex's are too designed for spec that discord doesn't follow (maybe later i will fix)
but this pr still does headings, masked link, and quote styling
yeah ๐ญ
its so weird
like i inspect element on lists, and it creates some intresting things
lol but i wasn't bothered to make new release on my package, so i just did temp disable ๐
like this is validish because the new line is the separator and it creates new list
1. hi
3. lol
4. yee
8. yay
-
hi
-
lol
-
yee
-
yay
so it follows some spec but not all
and you can add multiple lines to one point
* ok
lol
ok
-
ok
lolok
at least this isn't a thing
1. list
* not list
4. actually is a list
* no
- list
- not list
- actually is a list
- no
there wasn't anyone else who has done this list, so i can't just copy ;(
well this has been the case for @mentions and now masked link (for security, and im hoping i don't need to implment it here too), but i didn't think lists were so chaotic
i just haven't really worked out the end scope, like some things join and other things create new (and then actually fixing)
also, the widgetbot one doesn't support it either
@sharp python kinda spontanious, but do you have any data to see how used the forum site is? as i am kinda interested if it is actually used and in decent position
do you mean like number of visitors?
yeah

like i know you have vercel analytics
let me check the analytics dashboard
we get like 70-80 visitors daily
wow nice
unfortunately I have a limit because of my hobby plan so I can't see the entire data for the month
let me grab the data from the search board
hmm i was considering using them, but if there was that limit ill just not because i would use so infrequently (imagine if you could query top posts and make a "trending" section :))
it decided to not index new...
yay now i see that actual humans see it and have some impact ๐
we generate a lot of content so google slows down on indexing the pages, it is just a matter of time until it starts indexing them again
nice top post https://nextjs-forum.com/post/1127548774932287509
Next.js Discord Forum
I'm tryna access to the cookies in the middleware file.function (in another file):const getLoggedCookie = async() => {
const isLogged = cookies().has('logged');;
return isLogged
}middleware.tsconst middleware = async (requโฆ
but it looks almost like they indexed some pages but then unindexed them as its total at that time
the number of indexed posts dropped since oct 3
thats a month ago ๐
but i can't remember anything happening then
hmm lots of deleted posts i hope
Crawled - currently not indexed
The page was crawled by Google but not indexed. It may or may not be indexed in the future; no need to resubmit this URL for crawling.Discovered - currently not indexed
The page was found by Google, but not crawled yet. Typically, Google wanted to crawl the URL but this was expected to overload the site; therefore Google rescheduled the crawl. This is why the last crawl date is empty on the report.
most of the pages fall into these two categories
which is basically "they will be indexed some time in the future"
but that kinda makes sense... i feel like if google crawls it and 404, it gets sad ๐ญ
oh no... that means attachment thing soon
on oct 8th i changed to use sitemap (so not counted prob)... and some days prior we changed the revalidation time and add last mod (all shouldn't mess too much)
@sharp python also, is the position and ctr good? (i added my site and it is kinda...)
wow indeed cool... 7 is actually decent when considering stackoverflow and github
yeah
i think you have made a really good site ๐
your right, the site is useless without people adding content ๐
so it is a big group effort ๐คฉ
yeah and you and some others also helped with the coding
hmm yeah but that was minor compared to what you did... if we do have the https://canary.discord.com/channels/752553802359505017/1153325988189585468 it would be extra cool tho
yeah that looks great
i like the 3 options, but joulev's one while bold change, does look way cool
if i had time and knew css, id prob try and make it
lol if i were to actually do this, google would get kinda mad from redirections i think... (but maybe in long term it is better) https://github.com/rafaelalmeidatk/nextjs-forum/issues/56 - also would it like redirect when user changes their post na,e
ahhh no comment #1180905982692433960 message
@sharp python it kinda looks like you have until end of year to do the image thingy (and maybe not the 15) #697138785317814292 message (this is for app dir, but still proaibly same thing in terms of rollout)

I can't see the linked message but thats good news
I am secretly hoping they decide to not go forward with this change but it is good for the users so thats not gonna happen
im guessing it is because they didn't like the use of their cdn by websites such as yours (and def not those using it as a cdn for not even related to discord like exe or smth hosting)
yep
I have seen some people using it as a free hosting service, they would split very huge files and upload it all to discord
@sharp python yay you still have some time... but i wonder for how much longer (note this is for attachment thing)

I think I will get this done this weekend
๐
I decided to do the pnpm migration before the attachments thing and now I am stuck trying to fix tooling issues

ahhh
i think for github actions, you need to run corepack enable before setup node to install pnpm easily
and maybe add back packageManager in package.json for corepack to know what to install
I think the issue is with turborepo or I am doing something weird
when I call pnpm run build, it calls turbo run build and the build command from the bot project fails because it cant find tsc but it is listed there as a dependency
and when I call pnpm run build directly inside the bot folder it works

so I think I will just do cd apps/bot && pnpm run build
ahh i see, i was just going off the error on gh actions
maybe make the script pnpm tsc or maybe global install tsc with pnpm... idk tho as i thought it should just be able to get it like that...
it works on windows well tho
i have no idea if this will fix ci, but it may https://github.com/rafaelalmeidatk/nextjs-forum/pull/77
and im talking about this error
whaat
ok nevermind the error was pretty stupid

I fixed one issue they this one showed up
I had to leave before looking into this one

i kinda wonder how pnpm caused this error...
but mabe bun for github actions as a temp fix as i know that works well for typescript
also i think thats the error i kept on getting on windows, which is why it was always pain to deploy commands/sql tables
yeah you moved back to node 18 (so it couldn't have been moving to latest fixed/broke it)
to be fair, id say attachments are more important than this little ci script
this has just been overly chaotic to try and upgrade ๐ญ
btw, can you sometime host this on github or somethere not discord so it doesn't die next refresh of bot (as won't be verified attachment url)
oh yay, you fixed the forum bot's github action ๐
๐ i see your postgres change pr
@sharp python is there a reason you didnt want to be fancy and use the neon serverless driver for kysely like you had for planetscale (or is normal pg good enough with vercel)
not a specific reason, I believe this driver is mostly for the edge runtime compatibility which we are not using yet
ah that makes sense
i just thought it improved cold start speed
i havent benchmarked... but there is a chance pg driver can be better if avalible tho
@robust garden I added instructions to run the db locally
in case you want to try it out
yaya
its sooo much easier now, it was very annoying to ask people to create an account on planetscale
tbf that was one of my motivations for the migration ๐
๐ wow just a simple docker command and it exists
time to install docker
you should fix the readme's icon tho
its looking a little not nextjsy
so... if you do add s3/r2 support thats going to be fun as...
oh no ๐ญ
ah true, I think I am using a discord link
actually, if you do it right, you can just disable that if env var not present and just be like now with sad broken urls after a few days
github cameo :)
What if



