Skip to content

feat: add track change support to session change requests#75

Open
gor3a wants to merge 4 commits into
vitefrom
feat/session-track-change-requests
Open

feat: add track change support to session change requests#75
gor3a wants to merge 4 commits into
vitefrom
feat/session-track-change-requests

Conversation

@gor3a

@gor3a gor3a commented Jul 23, 2025

Copy link
Copy Markdown
Member

Add Track Change Support to Session Change Requests

Overview

This PR extends the session change request functionality to support track changes in addition to duration changes. Previously, users could only request changes to session start/end times. Now they can also request to move sessions to different tracks within the same space.

Changes Made

Database Schema Updates

  • Renamed table: session_duration_change_requestssession_change_requests to reflect broader scope
  • Added columns:
    • original_track_id - References the original track
    • requested_track_id - References the requested track (nullable)
  • Updated constraints and indexes to support track changes
  • Updated RLS policies for the renamed table

Frontend Component Updates

  • Renamed component: RequestDurationChangeDialogRequestSessionChangeDialog
  • Enhanced UI: Added checkbox to enable track change and searchable track selector
  • Improved validation: Ensures track changes are meaningful (different from original)
  • Better UX: Shows current track and allows selection of new track

API and Hook Updates

  • Enhanced mutations: Support for track changes in create/approve operations
  • Improved validation: Prevents approving requests that don't change anything
  • Better error handling: Clear error messages for invalid track changes
  • Updated queries: Include track information in change request data

UI/UX Improvements

  • Updated terminology: "Duration Change Requests" → "Session Change Requests"
  • Enhanced display: Shows both original and requested track information
  • Better filtering: Maintains existing filter functionality
  • Improved timestamps: More precise time display with seconds

Key Features

Track Change Request Flow

  1. User selects a session and clicks "Request Change"
  2. User can optionally check "Change Track" checkbox
  3. If checked, user selects a new track from available tracks
  4. User provides reason for the change
  5. Request is submitted for review

Validation Rules

  • Cannot request change to the same track
  • Cannot approve requests that don't change anything (time or track)
  • Track changes are optional - duration-only changes still work

Review Process

  • Admins can see both original and requested track information
  • Clear visual comparison between original and requested values
  • Same approval/rejection workflow as before

Testing Considerations

  • Test track change requests with different track selections
  • Verify validation prevents same-track requests
  • Test approval/rejection of track change requests
  • Ensure duration-only requests still work correctly
  • Verify UI displays track information correctly
  • Test filtering and search functionality

Migration Notes

  • Database migration renames existing table and adds new columns
  • Existing change requests will continue to work
  • New track-related fields will be null for existing requests

Screenshots

[Add screenshots of the new track change UI here]

Breaking Changes

  • Table name change from session_duration_change_requests to session_change_requests
  • Component name change from RequestDurationChangeDialog to RequestSessionChangeDialog

Related Issues

  • Closes #[Issue number for track change requests]
  • Addresses user feedback about needing to move sessions between tracks

- Rename session_duration_change_requests table to session_change_requests
- Add original_track_id and requested_track_id columns
- Update RequestDurationChangeDialog to RequestSessionChangeDialog
- Add track change UI with checkbox and searchable selector
- Enhance validation to prevent same-track requests
- Update queries and mutations to support track changes
- Improve error handling and user feedback
- Update database types and RLS policies
@vercel

vercel Bot commented Jul 23, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
agilespace ❌ Failed (Inspect) Jul 23, 2025 1:21pm

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 23, 2025

Copy link
Copy Markdown

Deploying agilespace with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7b7f711
Status: ✅  Deploy successful!
Preview URL: https://56334959.agilespace.pages.dev
Branch Preview URL: https://feat-session-track-change-re.agilespace.pages.dev

View logs

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.

1 participant