Skip to content

feat add 404 Not Found page and session handling#200

Open
hsinyu2527 wants to merge 9 commits into
COSCUP:mainfrom
hsinyu2527:fix/empty-session
Open

feat add 404 Not Found page and session handling#200
hsinyu2527 wants to merge 9 commits into
COSCUP:mainfrom
hsinyu2527:fix/empty-session

Conversation

@hsinyu2527

@hsinyu2527 hsinyu2527 commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Fixes #181

@rileychh-dokploy-coscup

rileychh-dokploy-coscup Bot commented Jun 12, 2026

Copy link
Copy Markdown

Dokploy Preview Deployment

Name Status Preview Updated (UTC)
Nuxt ❌ Failed Preview URL 2026-06-15T09:41:19.154Z

@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: 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".

Comment thread app/pages/session.vue Outdated
Comment thread app/assets/困惑小啄.png Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

  1. 壓一下不然好大
  2. 或許檔名不要用中文

Comment thread app/components/shared/CpNotFound.vue

@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: 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".

Comment thread app/pages/session.vue Outdated
</template>

<template v-if="selectedDay">
<template v-if="selectedDay && !isSessionNotFound">

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 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 👍 / 👎.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

這個還需要處理。當 Pretalx 回傳結果為空時,頁面會完全空白,因為舊的 <v-else> 區塊被刪除了。

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

如果沒記錯的話,這個部分會在 #172 被處理

Comment thread app/components/shared/CpNotFound.vue Outdated
Comment thread app/components/shared/CpNotFound.vue Outdated
Comment thread app/components/shared/CpNotFound.vue Outdated
Comment thread app/components/shared/CpNotFound.vue Outdated
@hsinyu2527 hsinyu2527 requested a review from rileychh June 15, 2026 06:35

@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: 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".

Comment thread app/error.vue
Comment thread app/pages/session/[id].vue Outdated
Comment on lines +12 to +16
if (!data.value) {
throw createError({
status: 404,
statusText: 'Page Not Found',
})

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 Preserve non-404 fetch errors

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 👍 / 👎.

Comment thread app/components/shared/CpNotFound.vue Outdated

@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: 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".

Comment thread app/pages/[...slug].vue
Comment on lines +23 to +26
throw createError({
statusCode: 404,
statusMessage: 'Page not found',
})

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 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 👍 / 👎.

Comment on lines +13 to +15
throw error.value.statusCode === 404
? createError({ status: 404, statusText: 'Page Not Found' })
: error.value

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 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: "抱歉我們找不到您要查找的頁面。"

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.

Suggested change
description: "抱歉我們找不到您要查找的頁面。"
description: "抱歉,我們找不到您要找尋的頁面。"

感覺需要一點標點符號

Comment thread app/pages/[...slug].vue
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.

如果是不存在的議程,目前會顯示成沒有提示的空畫面

5 participants