Skip to content

Comments

fix: allow editing phase time limits in retro board#803

Open
IJuanI wants to merge 7 commits intoStevenWeathers:mainfrom
IJuanI:feature/retro-timer-without-auto-advance
Open

fix: allow editing phase time limits in retro board#803
IJuanI wants to merge 7 commits intoStevenWeathers:mainfrom
IJuanI:feature/retro-timer-without-auto-advance

Conversation

@IJuanI
Copy link

@IJuanI IJuanI commented Sep 23, 2025

Description

This PR fixes a missing feature in the retro editing functionality that prevented users from modifying phase time limits after retro creation.

Problem

  1. Missing Edit Functionality: The EditRetro component was missing the phaseTimeLimitMin field, so users could only set phase time limits when creating a retro, but not when editing an existing retro.

  2. Backend Gap: The backend EditRetro function didn't support updating phaseTimeLimitMin, making it impossible to change time limits after retro creation.

  3. Inconsistent Experience: Users could set independent timer and auto-advance settings during creation, but couldn't modify the timer setting afterward, creating an inconsistent editing experience.

Solution

Frontend Changes

  • Added missing field: Added phaseTimeLimitMin input field to EditRetro.svelte component
  • Updated props: Added phaseTimeLimitMin to component interface and state management
  • Form integration: Connected the field to the form submission logic

Backend Changes

  • Database layer: Updated EditRetro function in internal/db/retro/retro.go to accept and update phaseTimeLimitMin parameter
  • SQL query: Added phase_time_limit_min = $7 to the UPDATE statement
  • Event handling: Updated websocket event handler in internal/http/retro/events.go to process the new parameter
  • Interface updates: Updated function signatures in internal/http/types.go and internal/http/retro/retro.go

Key Benefits

  • Complete editing: Users can now edit phase time limits after creating a retro
  • Consistent experience: Edit functionality now matches the creation functionality
  • Flexible timer usage: Timer shows when phaseTimeLimitMin > 0 regardless of phaseAutoAdvance setting
  • No breaking changes: Fully backward compatible

Use Cases Now Supported

  • Timer with auto-advance: phaseTimeLimitMin > 0 + phaseAutoAdvance = true
  • Timer without auto-advance: phaseTimeLimitMin > 0 + phaseAutoAdvance = false (now editable)
  • No timer: phaseTimeLimitMin = 0 (timer hidden regardless of auto-advance setting)

Testing Added

E2E Tests (e2e/tests/retro/retro.spec.ts)

  • Test editing retro with phase time limit and disabled auto-advance
  • Test timer visibility when phaseTimeLimitMin > 0
  • Test timer hidden when phaseTimeLimitMin = 0

API Tests (e2e/tests/api/retros.spec.ts)

  • Test retro creation with phaseTimeLimitMin and phaseAutoAdvance parameters

Files Changed

  • ui/src/components/retro/EditRetro.svelte - Added missing phaseTimeLimitMin field
  • ui/src/pages/retro/Retro.svelte - Pass phaseTimeLimitMin to EditRetro component
  • internal/db/retro/retro.go - Updated EditRetro function signature and SQL
  • internal/http/retro/events.go - Updated event handler for new parameter
  • internal/http/types.go - Updated interface definition
  • internal/http/retro/retro.go - Updated interface definition
  • e2e/tests/retro/retro.spec.ts - Added E2E tests
  • e2e/tests/api/retros.spec.ts - Added API tests

Breaking Changes

None - this is a backward-compatible bug fix and enhancement.

Checklist

  • Added missing functionality to EditRetro component
  • Updated backend to support phaseTimeLimitMin editing
  • Added comprehensive tests
  • Maintained backward compatibility
  • Followed existing code patterns and conventions

- Add phaseTimeLimitMin field to EditRetro component for editing time limits
- Update backend EditRetro function to support phaseTimeLimitMin updates
- Update database layer and API interfaces to handle phase time limit editing
- Timer now shows when phaseTimeLimitMin > 0 regardless of phaseAutoAdvance setting
- Add E2E tests for retro editing with phase time limits
- Add API tests for retro creation with timer settings

This allows teams to use a timer for time management during brainstorm phase
even when they don't want automatic phase transitions.
@IJuanI IJuanI changed the title feat: enable retro phase timer without auto-advance fix: enable retro phase timer without auto-advance Sep 23, 2025
@IJuanI IJuanI marked this pull request as draft September 23, 2025 17:28
@IJuanI IJuanI changed the title fix: enable retro phase timer without auto-advance fix: allow editing phase time limits in retro board Sep 23, 2025
@IJuanI IJuanI marked this pull request as ready for review September 23, 2025 17:34
@IJuanI IJuanI marked this pull request as draft September 23, 2025 17:39
@IJuanI IJuanI marked this pull request as ready for review September 23, 2025 17:40
@IJuanI
Copy link
Author

IJuanI commented Oct 7, 2025

Thanks for running the CI!
I see some visual tests failed, I didn't find this issues locally, will check them in more detail 👀

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.

2 participants