feat: update session popup#262
Conversation
Dokploy Preview Deployment
|
|
Warning Review limit reached
Next review available in: 6 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (10)
📝 WalkthroughWalkthroughThe 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. ChangesSession detail UI
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
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
📒 Files selected for processing (3)
app/components/feature/CpSessionInfoCard.vueapp/pages/session/[id].vueuno.config.ts
There was a problem hiding this comment.
💡 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".
| 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) |
There was a problem hiding this comment.
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 👍 / 👎.
There was a problem hiding this comment.
改由從父層傳 trackColors,這樣切換到收藏時 (總 session 數量不同時),同一個 session 的顏色也會是相同的
修改於 de2e9a3
There was a problem hiding this comment.
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 winLocalize the close button aria-label. Replace the hard-coded
aria-label="close"with a translated label, e.g.:aria-label="t('close')"; add theclosemessage 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
📒 Files selected for processing (5)
app/pages/session/[id].vueapp/utils/tracks.tsserver/api/session/[id]/index.get.tsshared/types/session.tsshared/utils/tracks.ts
✅ Files skipped from review due to trivial changes (1)
- shared/types/session.ts
There was a problem hiding this comment.
🧹 Nitpick comments (1)
app/components/feature/CpSessionTrackTable.vue (1)
8-8: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winConsolidate
isMainTrackimport to eliminate local duplicate.The import on line 8 already pulls from
~/utils/tracks, andCpSessionTable.vueimportsisMainTrackfrom the same module. The localMAIN_TRACK_NAMES+isMainTrackat lines 82–85 are identical to the shared implementation. AddingisMainTrackto 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
📒 Files selected for processing (7)
app/components/feature/CpSessionTable.vueapp/components/feature/CpSessionTrackTable.vueapp/pages/session.vueapp/pages/session/[id].vueapp/utils/tracks.tsserver/api/session/[id]/index.get.tsshared/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
close #211
Summary
更新議程詳情彈窗的版面,讓使用者在查看單一議程時能直接收藏、辨識議程軌,並在手機上以更接近 bottom sheet 的方式操作。
Changes
favoriteUnoCSS theme color 供收藏狀態使用。Impact
Summary by CodeRabbit
Summary by CodeRabbit