Skip to content

feat: update session popup#262

Merged
mirumodapon merged 5 commits into
mainfrom
session-popup
Jul 13, 2026
Merged

feat: update session popup#262
mirumodapon merged 5 commits into
mainfrom
session-popup

Conversation

@Link1515

@Link1515 Link1515 commented Jul 11, 2026

Copy link
Copy Markdown
Member

close #211

Summary

更新議程詳情彈窗的版面,讓使用者在查看單一議程時能直接收藏、辨識議程軌,並在手機上以更接近 bottom sheet 的方式操作。

Changes

  • 調整議程詳情 modal 為置中的固定尺寸彈窗,手機版改為 bottom sheet 形式。
  • 新增手機版向下拖曳關閉互動,並保留點擊遮罩與 Escape 關閉。
  • 在詳情彈窗加入收藏按鈕,支援已收藏 / 未收藏狀態與 i18n 文案。
  • 顯示議程軌標籤,並連結到對應的 track 頁面。
  • 將 track 顏色計算邏輯抽到 shared util,讓前端議程表與 server API 共用同一套規則。
  • 讓單一議程 API 回傳 trackColor,議程詳情頁不須額外抓完整 /api/session。
  • 重新整理議程資訊卡版面、間距、講者介紹區塊與手機版廣告位置。
  • 新增 favorite UnoCSS theme color 供收藏狀態使用。

Impact

  • 影響議程詳情頁 app/pages/session/[id].vue 的 UI、互動行為與資料取得方式。
  • 影響 CpSessionInfoCard 的 props 與顯示內容。
  • 影響單一議程 API 回傳資料,新增 trackColor 欄位。

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features
    • Session pages now display track info with localized links and consistent track color accents across tables and the session header/details.
    • Mobile session dialog has been redesigned into a draggable bottom sheet with improved touch behavior, and favorite/close controls moved into the scrollable area.
  • Bug Fixes
    • Updated the Chinese session abstract text to the corrected wording.
  • UI Improvements
    • Improved responsive rendering for speakers, abstracts, and tag styling, including language-aware spacing and layout.

@rileychh-dokploy-coscup

rileychh-dokploy-coscup Bot commented Jul 11, 2026

Copy link
Copy Markdown

Dokploy Preview Deployment

Name Status Preview Updated (UTC)
Nuxt ✅ Done Preview URL 2026-07-11T13:59:09.580Z

@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Link1515, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 6 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f6dc28f1-20f9-4687-ac2f-ddb0ae892ec5

📥 Commits

Reviewing files that changed from the base of the PR and between 3da7cdf and 92a9375.

📒 Files selected for processing (10)
  • app/components/feature/CpSessionInfoCard.vue
  • app/components/feature/CpSessionTable.vue
  • app/components/feature/CpSessionTrackTable.vue
  • app/pages/session.vue
  • app/pages/session/[id].vue
  • app/utils/tracks.ts
  • server/api/session/[id]/index.get.ts
  • shared/types/session.ts
  • shared/utils/tracks.ts
  • uno.config.ts
📝 Walkthrough

Walkthrough

The session detail experience now supports localized track metadata, deterministic track colors, revised speaker and abstract rendering, formatted session times, and a draggable mobile bottom-sheet dialog.

Changes

Session detail UI

Layer / File(s) Summary
Track color utilities and session contract
shared/utils/tracks.ts, app/utils/tracks.ts, shared/types/session.ts
Adds deterministic track-color helpers, re-exports them through the application utility, and adds trackColor to session detail validation.
Session detail response construction
server/api/session/[id]/index.get.ts
Builds session responses through buildSessionSummary, computes same-day track colors, and returns a mapped or fallback color.
Session list color propagation
app/pages/session.vue, app/components/feature/CpSessionTable.vue, app/components/feature/CpSessionTrackTable.vue
Builds a shared track-color map and passes it to both session table components for rendering.
Session card and mobile bottom sheet
app/components/feature/CpSessionInfoCard.vue, app/pages/session/[id].vue, uno.config.ts
Updates track, metadata, tags, speakers, ads, and abstract rendering, while adding localized session data, favorites styling, and touch-driven bottom-sheet behavior.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant SessionPage
  participant SessionAPI
  participant CpSessionInfoCard
  User->>SessionPage: open session route
  SessionPage->>SessionAPI: fetch session detail
  SessionAPI-->>SessionPage: return session and track color
  SessionPage->>CpSessionInfoCard: pass localized track and session data
  User->>SessionPage: drag bottom sheet
  SessionPage-->>SessionPage: update offset or close at threshold
Loading

Possibly related PRs

  • COSCUP/2026#215: Reuses CpSessionInfoCard.vue in another session modal flow affected by its prop and rendering changes.
  • COSCUP/2026#222: Also changes session card layout and the session detail popup structure.
  • COSCUP/2026#256: Overlaps the shared track-color utility and session table rendering flow.

Suggested reviewers: mirumodapon, rileychh

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and matches the main change: updating the session popup.
Linked Issues check ✅ Passed The changes implement the new no-session-info popup, including mobile bottom sheet behavior, track links, favorite state, and trackColor support.
Out of Scope Changes check ✅ Passed The changes stay focused on the session popup, related track-color utilities, API support, and UI adjustments.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch session-popup

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@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 `@app/pages/session/`[id].vue:
- Around line 210-307: Update the session dialog container around the existing
`role="dialog"` to use `tabindex="-1"` and a `dialogEl` ref, then implement
focus management for its open/close lifecycle: move focus into the dialog when
opened, trap Tab and Shift+Tab within its focusable descendants (using the
existing VueUse integration if available), and restore focus to the element that
triggered the dialog when `close` runs. Preserve the current Escape and
backdrop-close behavior.
🪄 Autofix (Beta)

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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 171b6d24-9bff-45d3-8444-adf2e62335be

📥 Commits

Reviewing files that changed from the base of the PR and between 5eef1f2 and ec3a788.

📒 Files selected for processing (3)
  • app/components/feature/CpSessionInfoCard.vue
  • app/pages/session/[id].vue
  • uno.config.ts

Comment thread app/pages/session/[id].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: 78642d0989

ℹ️ 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 on lines +42 to +47
const daySessions = data.submissions.arr
.filter((item) => item.state === 'confirmed')
.map((item) => buildSessionSummary(item, data))
.filter((item): item is SessionSummary => item !== null && item.start?.startsWith(day) === true)

const trackColors = buildTrackColorMap(daySessions)

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 Keep popup colors in the same palette as filtered schedules

When the schedule is filtered to favorites, a shared list, search results, rooms, or tags, app/pages/session.vue passes only displayedSessions into both table components, and those components derive their track palette from that filtered prop (CpSessionTable around lines 99-100 and CpSessionTrackTable around lines 127-128). This endpoint always rebuilds the popup color from every confirmed session on the day, so opening a filtered card can show a different track strip/pill color than the card the user clicked whenever earlier track IDs were filtered out. Use the same session set/palette context as the visible table, or make the tables use the full-day palette too.

Useful? React with 👍 / 👎.

@Link1515 Link1515 Jul 11, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

改由從父層傳 trackColors,這樣切換到收藏時 (總 session 數量不同時),同一個 session 的顏色也會是相同的
修改於 de2e9a3

@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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
app/pages/session/[id].vue (1)

249-253: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Localize the close button aria-label. Replace the hard-coded aria-label="close" with a translated label, e.g. :aria-label="t('close')"; add the close message if this page doesn’t already define it.

🤖 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 `@app/pages/session/`[id].vue around lines 249 - 253, Update the close button
in the session page to bind its aria-label through the existing translation
function, using the `close` message key instead of the hard-coded text. Add the
`close` translation message to the page’s messages only if it is not already
defined.
🤖 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 `@server/api/session/`[id]/index.get.ts:
- Around line 33-41: Update the session validation after buildSessionSummary so
it also treats a missing session.start as not found before calling slice.
Preserve the existing 404 createError behavior, and only derive day from
session.start after confirming the value exists.

---

Outside diff comments:
In `@app/pages/session/`[id].vue:
- Around line 249-253: Update the close button in the session page to bind its
aria-label through the existing translation function, using the `close` message
key instead of the hard-coded text. Add the `close` translation message to the
page’s messages only if it is not already defined.
🪄 Autofix (Beta)

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: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 10021e74-4cfc-4ac1-bdfb-5801b85066a5

📥 Commits

Reviewing files that changed from the base of the PR and between ec3a788 and 78642d0.

📒 Files selected for processing (5)
  • app/pages/session/[id].vue
  • app/utils/tracks.ts
  • server/api/session/[id]/index.get.ts
  • shared/types/session.ts
  • shared/utils/tracks.ts
✅ Files skipped from review due to trivial changes (1)
  • shared/types/session.ts

Comment thread server/api/session/[id]/index.get.ts Outdated

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

🧹 Nitpick comments (1)
app/components/feature/CpSessionTrackTable.vue (1)

8-8: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Consolidate isMainTrack import to eliminate local duplicate.

The import on line 8 already pulls from ~/utils/tracks, and CpSessionTable.vue imports isMainTrack from the same module. The local MAIN_TRACK_NAMES + isMainTrack at lines 82–85 are identical to the shared implementation. Adding isMainTrack to this import and removing the local copy aligns with the PR's goal of centralizing track logic.

♻️ Proposed refactor
-import { DEFAULT_TRACK_COLOR, NO_TRACK } from '~/utils/tracks'
+import { DEFAULT_TRACK_COLOR, isMainTrack, NO_TRACK } from '~/utils/tracks'

Then remove the local duplicate at lines 82–85:

-// Match by name (either locale) since Pretalx track ids aren't stable across events.
-const MAIN_TRACK_NAMES = ['主議程', 'Main Session Track']
-function isMainTrack(name?: SessionTrack['name']) {
-  return MAIN_TRACK_NAMES.includes(name?.['zh-hant'] ?? '') || MAIN_TRACK_NAMES.includes(name?.en ?? '')
-}
🤖 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 `@app/components/feature/CpSessionTrackTable.vue` at line 8, Update the tracks
import in CpSessionTrackTable.vue to include the shared isMainTrack utility,
then remove the local MAIN_TRACK_NAMES constant and isMainTrack implementation.
Ensure all existing uses continue referencing the imported shared
implementation.
🤖 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.

Nitpick comments:
In `@app/components/feature/CpSessionTrackTable.vue`:
- Line 8: Update the tracks import in CpSessionTrackTable.vue to include the
shared isMainTrack utility, then remove the local MAIN_TRACK_NAMES constant and
isMainTrack implementation. Ensure all existing uses continue referencing the
imported shared implementation.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d1c487df-6af8-4306-bce9-37ccb07cec54

📥 Commits

Reviewing files that changed from the base of the PR and between 78642d0 and 3da7cdf.

📒 Files selected for processing (7)
  • app/components/feature/CpSessionTable.vue
  • app/components/feature/CpSessionTrackTable.vue
  • app/pages/session.vue
  • app/pages/session/[id].vue
  • app/utils/tracks.ts
  • server/api/session/[id]/index.get.ts
  • shared/utils/tracks.ts
🚧 Files skipped from review as they are similar to previous changes (4)
  • shared/utils/tracks.ts
  • app/utils/tracks.ts
  • server/api/session/[id]/index.get.ts
  • app/pages/session/[id].vue

@mirumodapon mirumodapon merged commit 76d0508 into main Jul 13, 2026
2 checks passed
@mirumodapon mirumodapon deleted the session-popup branch July 13, 2026 02:25
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.

新 no 議程資訊 popup

2 participants