feat add 404 Not Found page and session handling#200
Conversation
Dokploy Preview Deployment
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2edd893416
ℹ️ 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".
2edd893 to
093c226
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 093c226d5d
ℹ️ 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".
| </template> | ||
|
|
||
| <template v-if="selectedDay"> | ||
| <template v-if="selectedDay && !isSessionNotFound"> |
There was a problem hiding this comment.
Restore the empty schedule state
When Pretalx has no confirmed scheduled sessions, or /api/session filters every submission out, days is empty and selectedDay is null. Since this is now the only client-rendered branch, the session page renders nothing after the loading fallback; before this change the noSession paragraph covered that state. Please keep an empty-state branch so visitors do not see a blank schedule before sessions are announced.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
這個還需要處理。當 Pretalx 回傳結果為空時,頁面會完全空白,因為舊的 <v-else> 區塊被刪除了。
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 564aea7b27
ℹ️ 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".
| if (!data.value) { | ||
| throw createError({ | ||
| status: 404, | ||
| statusText: 'Page Not Found', | ||
| }) |
There was a problem hiding this comment.
Here useFetch returns data: null for failed responses in general, not just API 404s; /api/session/:id can also fail when the Pretalx fetch or parsing throws a 500. This branch converts those failures into a 404 response, hiding outages and marking valid session URLs as not found, so please inspect/rethrow error.value and only create a 404 for actual not-found responses.
Useful? React with 👍 / 👎.
564aea7 to
9afc375
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1025479e4d
ℹ️ 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".
| throw createError({ | ||
| statusCode: 404, | ||
| statusMessage: 'Page not found', | ||
| }) |
There was a problem hiding this comment.
Make content 404s fatal on client navigation
When a user reaches a missing content slug via in-app navigation on this static Nuxt site, this throw createError() runs on the client; Nuxt treats client-side createError without fatal: true as non-fatal, so app/error.vue is not rendered and the old inline fallback has been removed. Mark this error fatal (or use showError) so both direct loads and client-side route changes show the 404 page.
Useful? React with 👍 / 👎.
| throw error.value.statusCode === 404 | ||
| ? createError({ status: 404, statusText: 'Page Not Found' }) | ||
| : error.value |
There was a problem hiding this comment.
Make session fetch failures reach error.vue
For an invalid or stale session URL reached through client-side navigation, this branch throws a non-fatal client error, so Nuxt does not render app/error.vue even though the direct SSR/static 404 path can work. Wrap the API error in a fatal Nuxt error before throwing so the session detail route consistently shows the 404/generic error page instead of leaving the user on the previous page with an unhandled navigation error.
Useful? React with 👍 / 👎.
| takeMeHome: 'Take me home' | ||
| zh: | ||
| pageNotFound: '頁面不存在' | ||
| description: "抱歉我們找不到您要查找的頁面。" |
There was a problem hiding this comment.
| description: "抱歉我們找不到您要查找的頁面。" | |
| description: "抱歉,我們找不到您要找尋的頁面。" |
感覺需要一點標點符號
Fixes #181