-
-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add relevantBlock function #1100
Conversation
WalkthroughThe overall changes introduce a Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Server
participant Cuesheet
participant RuntimeService
Client->>Server: Connect Socket
Server->>Cuesheet: Update currentBlockId
Cuesheet->>RuntimeService: Fetch currentBlock state
RuntimeService->>Cuesheet: Return currentBlock state
Cuesheet->>Client: Render based on currentBlockId
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Outside diff range, codebase verification and nitpick comments (2)
apps/server/src/services/TimerService.ts (1)
99-100
: Ensure backward compatibility for theroll
method.The
roll
method signature has been updated to acceptplayableEvents
andrundown
. However, not all calls to this method have been updated accordingly. The following locations need to be revised to match the new method signature:
apps/server/src/api-integration/integration.controller.ts
:
- Line 1:
runtimeService.roll();
apps/server/src/services/runtime-service/RuntimeService.ts
:
- Line 1:
this.roll();
- Line 2:
this.roll();
Please update these calls to match the new signature to prevent runtime errors.
Analysis chain
Ensure backward compatibility for the
roll
method.The
roll
method signature has been updated to acceptplayableEvents
andrundown
. Ensure that all calls to this method are updated accordingly to prevent runtime errors.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify all function calls to `roll` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type js -A 5 $'roll'Length of output: 24
Script:
#!/bin/bash # Description: Verify all function calls to `roll` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type js,ts -A 5 'roll('Length of output: 91
Script:
#!/bin/bash # Description: Verify all function calls to `roll` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type js,ts -A 5 'roll\('Length of output: 61
Script:
#!/bin/bash # Description: Verify all function calls to `roll` match the new signature. # Test: Search for the function usage. Expect: Only occurrences of the new signature. rg --type js -A 5 'roll\(' rg --type ts -A 5 'roll\('Length of output: 5602
apps/client/src/features/cuesheet/Cuesheet.tsx (1)
94-94
: Remove or handle console.log.The console.log statement for
currentBlockId
should be removed or handled appropriately before deploying to production.- console.log(currentBlockId);
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (4)
packages/types/src/definitions/runtime/BlockState.type.ts
is excluded by none and included by nonepackages/types/src/definitions/runtime/RuntimeStore.type.ts
is excluded by none and included by nonepackages/types/src/index.ts
is excluded by none and included by nonepackages/utils/index.ts
is excluded by none and included by none
Files selected for processing (12)
- apps/client/src/common/hooks/useSocket.ts (1 hunks)
- apps/client/src/common/stores/runtime.ts (1 hunks)
- apps/client/src/common/utils/socket.ts (1 hunks)
- apps/client/src/features/cuesheet/Cuesheet.tsx (4 hunks)
- apps/client/src/features/cuesheet/CuesheetWrapper.tsx (1 hunks)
- apps/server/src/app.ts (1 hunks)
- apps/server/src/services/TimerService.ts (2 hunks)
- apps/server/src/services/runtime-service/RuntimeService.ts (7 hunks)
- apps/server/src/stores/tests/runtimeState.test.ts (4 hunks)
- apps/server/src/stores/runtimeState.ts (13 hunks)
- packages/utils/src/rundown-utils/rundownUtils.test.ts (2 hunks)
- packages/utils/src/rundown-utils/rundownUtils.ts (2 hunks)
Files skipped from review due to trivial changes (2)
- apps/client/src/common/hooks/useSocket.ts
- apps/client/src/common/stores/runtime.ts
Additional comments not posted (24)
apps/client/src/features/cuesheet/CuesheetWrapper.tsx (1)
110-110
: LGTM! But ensurecurrentBlockId
is properly passed and utilized.The
currentBlockId
prop has been added to theCuesheet
component. Ensure that this prop is correctly passed and utilized within theCuesheet
component.apps/client/src/common/utils/socket.ts (1)
153-158
: LGTM! The new event typeontime-blockState
is handled correctly.The
ontime-blockState
event is logged, the runtime is patched, and DevTools are updated accordingly.apps/client/src/features/cuesheet/Cuesheet.tsx (2)
118-119
: EnsurecurrentBlockId
logic is correct.The
currentBlockId
is used to conditionally render the block rows. Ensure that the logic for usingcurrentBlockId
is correct and does not introduce any bugs.
24-24
: EnsurecurrentBlockId
is correctly utilized.The
currentBlockId
prop has been added to theCuesheetProps
interface. Ensure that this prop is correctly passed and utilized within the component.Verification successful
To ensure that
currentBlockId
is correctly utilized, let's delve deeper into the implementation details ofCuesheetWrapper.tsx
andCuesheet.tsx
.
currentBlockId
is correctly utilized.
currentBlockId
is passed as a prop fromCuesheetWrapper.tsx
toCuesheet.tsx
.- Within
Cuesheet.tsx
,currentBlockId
is correctly used in logical checks and rendering.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that `currentBlockId` is correctly utilized within the component. # Test: Search for the usage of `currentBlockId` within the file. rg --type ts -A 5 $'currentBlockId'Length of output: 2580
Script:
#!/bin/bash # Description: Verify the correct usage of `currentBlockId` in `CuesheetWrapper.tsx` and `Cuesheet.tsx`. # Check the implementation in CuesheetWrapper.tsx echo "Checking CuesheetWrapper.tsx:" rg --type ts -A 10 'currentBlockId=' apps/client/src/features/cuesheet/CuesheetWrapper.tsx # Check the usage in Cuesheet.tsx echo "Checking Cuesheet.tsx:" rg --type ts -A 10 'currentBlockId' apps/client/src/features/cuesheet/Cuesheet.tsxLength of output: 1601
apps/server/src/stores/__tests__/runtimeState.test.ts (3)
97-102
: Ensure comprehensive testing ofblockState.block
.The test checks that
blockState.block
isnull
after callingload
. Ensure that all relevant scenarios forblockState.block
are covered in tests.
167-172
: VerifyblockState.block
in runtime offset test.The test correctly verifies that
blockState.block
isnull
after callingload
. Consider adding tests for non-null scenarios if applicable.
Line range hint
187-204
:
ValidateblockState.block
in next event test.Ensure that
blockState.block
is validated correctly in the context of loading the next event.apps/server/src/app.ts (1)
182-185
: Verify initialization ofblockState
.The
blockState
is initialized withblock
andstartedAt
properties asnull
. Ensure this initialization is consistent with the rest of the codebase and the desired functionality.packages/utils/src/rundown-utils/rundownUtils.test.ts (1)
267-299
: Comprehensive testing ofrelevantBlock
.The tests cover various scenarios for the
relevantBlock
function. Ensure all edge cases are considered, such as empty or malformed rundown arrays.apps/server/src/stores/runtimeState.ts (9)
1-11
: AddblockState
toRuntimeState
type.The addition of
blockState
to theRuntimeState
type appears correct and consistent with the other state properties.Also applies to: 55-55
72-75
: InitializeblockState
inruntimeState
.The initialization of
blockState
withinruntimeState
is correct and consistent with the rest of the state initialization.
98-99
: ResetblockState
inclear
function.The
clear
function correctly resets theblockState
properties tonull
.
152-159
: Updateload
function parameters.The
load
function now correctly acceptsplayableEvents
andrundown
as parameters.
190-192
: UpdateblockState.block
inloadNow
function.The
loadNow
function correctly updates theblockState.block
using thegetRelevantBlock
function.
294-294
: ResetblockState.startedAt
inreload
function.The
reload
function correctly resets theblockState.startedAt
property.
305-306
: UpdatereloadAll
function parameters.The
reloadAll
function now correctly acceptsplayableEvents
andrundown
as parameters.
333-335
: UpdateblockState.startedAt
instart
function.The
start
function correctly updates theblockState.startedAt
property.
486-491
: Updateroll
function parameters.The
roll
function now correctly acceptsplayableEvents
andrundown
as parameters.apps/server/src/services/runtime-service/RuntimeService.ts (6)
104-106
: UpdatecheckTimerUpdate
function to handleblockState
.The
checkTimerUpdate
function correctly integrates the logic to handle theblockState
property.
238-239
: UpdatemaybeUpdate
function parameters.The
maybeUpdate
function now correctly acceptsplayableEvents
andrundown
as parameters.
263-265
: UpdateloadEvent
function parameters.The
loadEvent
function now correctly acceptsplayableEvents
andrundown
as parameters.
514-516
: Updateroll
function parameters.The
roll
function now correctly acceptsplayableEvents
andrundown
as parameters.
546-548
: Updateresume
function parameters.The
resume
function now correctly acceptsplayableEvents
andrundown
as parameters.
610-613
: UpdatebroadcastResult
function to handleblockState
.The
broadcastResult
function correctly integrates the logic to handle theblockState
property.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (3)
packages/types/src/definitions/runtime/CurrentBlockState.type.ts
is excluded by none and included by nonepackages/types/src/definitions/runtime/RuntimeStore.type.ts
is excluded by none and included by nonepackages/types/src/index.ts
is excluded by none and included by none
Files selected for processing (8)
- apps/client/src/common/hooks/useSocket.ts (1 hunks)
- apps/client/src/common/stores/runtime.ts (1 hunks)
- apps/client/src/common/utils/socket.ts (1 hunks)
- apps/server/src/app.ts (1 hunks)
- apps/server/src/services/runtime-service/RuntimeService.ts (7 hunks)
- apps/server/src/stores/tests/runtimeState.test.ts (4 hunks)
- apps/server/src/stores/runtimeState.ts (13 hunks)
- packages/utils/src/rundown-utils/rundownUtils.ts (2 hunks)
Files skipped from review as they are similar to previous changes (5)
- apps/client/src/common/hooks/useSocket.ts
- apps/client/src/common/stores/runtime.ts
- apps/client/src/common/utils/socket.ts
- apps/server/src/app.ts
- apps/server/src/stores/runtimeState.ts
Additional context used
GitHub Check: unit-test
apps/server/src/stores/__tests__/runtimeState.test.ts
[failure] 171-171: src/stores/tests/runtimeState.test.ts > mutation on runtimeState > playback operations > runtime offset
AssertionError: expected +0 to be 1500 // Object.is equality
- Expected
- Received
- 1500
- 0
❯ src/stores/tests/runtimeState.test.ts:171:43
Additional comments not posted (10)
apps/server/src/stores/__tests__/runtimeState.test.ts (4)
102-102
: Approve the new assertion fornewState.blockState.block
.The addition of this assertion is a good practice to ensure that the block state is correctly handled. It helps maintain robustness in state management by explicitly checking expected values.
172-172
: Approve the new assertions fornewState.currentBlock.block
.These assertions are crucial for verifying that the block state is correctly reset or initialized in different test scenarios. They help ensure the robustness and correctness of the state management.
Also applies to: 204-204
97-97
: Verify the new parameter in theload
function call.The
load
function now includes an additional parameter. Ensure that this change is consistent with the updated function signature and that the new parameter is correctly utilized in the context of this test.Verification successful
The new parameter in the
load
function call is correctly utilized.The
load
function definition inapps/server/src/stores/runtimeState.ts
includes four parameters, and the test fileapps/server/src/stores/__tests__/runtimeState.test.ts
has been updated consistently to reflect this change.
apps/server/src/stores/runtimeState.ts
(function definition)apps/server/src/stores/__tests__/runtimeState.test.ts
(function usage)Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the new parameter usage in the `load` function. # Test: Search for the `load` function definition and usage. Expect: Consistent usage of the new parameter across the codebase. rg --type python -A 5 $'load'Length of output: 59
Script:
#!/bin/bash # Description: Verify the new parameter usage in the `load` function. # Test: Search for the `load` function definition and usage in TypeScript files. Expect: Consistent usage of the new parameter across the codebase. rg --type ts -A 5 'load'Length of output: 208570
167-167
: Verify the updatedload
function call in another test context.Ensure that the additional parameter in the
load
function call is correctly used and aligns with the updated function signature, similar to the previous change.Verification successful
Verify the updated
load
function call in another test context.Ensure that the additional parameter in the
load
function call is correctly used and aligns with the updated function signature, similar to the previous change.
apps/server/src/stores/runtimeState.ts
: Definition ofload
function.apps/server/src/stores/__tests__/runtimeState.test.ts
: Usage ofload
function in the test context.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the updated `load` function call in another test context. # Test: Search for the `load` function definition and usage. Expect: Consistent usage of the new parameter across different test cases. rg --type python -A 5 $'load'Length of output: 59
Script:
#!/bin/bash # Description: Verify the updated `load` function call in another test context. # Test: Search for the `load` function definition and usage. Expect: Consistent usage of the new parameter across different test cases. rg --type typescript -A 5 'load'Length of output: 67
Script:
#!/bin/bash # Description: Verify the updated `load` function call in another test context. # Test: Search for the `load` function definition and usage. Expect: Consistent usage of the new parameter across different test cases. rg -A 5 'load'Length of output: 223062
packages/utils/src/rundown-utils/rundownUtils.ts (1)
1-2
: Updated imports and added new utility function.The imports have been updated to include
OntimeBlock
andisOntimeBlock
. This aligns with the new functionality introduced in thegetRelevantBlock
function.apps/server/src/services/runtime-service/RuntimeService.ts (5)
104-106
: Review ofgetRundown
usage incheckTimerUpdate
.The method
getRundown
is correctly used here to fetch rundown data alongside playable events, which are then passed to theroll
method ofeventTimer
. This ensures that the latest rundown data is used during the rolling process.
238-239
: Review ofgetRundown
usage inmaybeUpdate
.Here,
getRundown
is used to fetch the latest rundown data for thereloadAll
method. This is crucial for ensuring that the runtime state is updated with the most current data, especially when handling multiple events.
263-265
: Review ofgetRundown
usage inloadEvent
.The method
getRundown
is used to fetch the latest rundown data, which is essential for theload
method inruntimeState
. This ensures that the event loading process is based on the most current rundown information.
514-516
: Review ofgetRundown
usage inroll
.
getRundown
is used to fetch the latest rundown data, which is then used in theroll
method ofeventTimer
. This is appropriate as it ensures that the event rolling process is based on the most current rundown data.
546-548
: Review ofgetRundown
usage inresume
.The method
getRundown
is used here to fetch the latest rundown data, which is crucial for theresume
method inruntimeState
. This ensures that the resume process is based on the most current rundown information.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- apps/client/src/features/cuesheet/Cuesheet.tsx (3 hunks)
Files skipped from review as they are similar to previous changes (1)
- apps/client/src/features/cuesheet/Cuesheet.tsx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- packages/utils/src/rundown-utils/rundownUtils.ts (2 hunks)
Files skipped from review as they are similar to previous changes (1)
- packages/utils/src/rundown-utils/rundownUtils.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
packages/types/src/definitions/runtime/RuntimeStore.type.ts
is excluded by none and included by none
Files selected for processing (6)
- apps/client/src/common/stores/runtime.ts (1 hunks)
- apps/server/src/app.ts (1 hunks)
- apps/server/src/services/TimerService.ts (2 hunks)
- apps/server/src/services/runtime-service/RuntimeService.ts (6 hunks)
- apps/server/src/stores/tests/runtimeState.test.ts (4 hunks)
- apps/server/src/stores/runtimeState.ts (13 hunks)
Files skipped from review as they are similar to previous changes (4)
- apps/client/src/common/stores/runtime.ts
- apps/server/src/services/TimerService.ts
- apps/server/src/stores/tests/runtimeState.test.ts
- apps/server/src/stores/runtimeState.ts
Additional comments not posted (6)
apps/server/src/app.ts (1)
182-185
: Verify the correctness of the newcurrentBlock
object.Ensure that the
currentBlock
object is correctly initialized and used within theeventStore.init
call. This change seems to be correctly adding thecurrentBlock
object withblock
andstartedAt
properties initialized tonull
.apps/server/src/services/runtime-service/RuntimeService.ts (5)
249-250
: Verify the correctness of thegetRundown
function usage.Ensure that the
getRundown
function is correctly used in theruntimeState.reloadAll
call. This change seems to be correctly adding therundown
parameter to thereloadAll
call.
274-276
: Verify the correctness of thegetRundown
function usage.Ensure that the
getRundown
function is correctly used in theruntimeState.load
call. This change seems to be correctly adding therundown
parameter to theload
call.
525-527
: Verify the correctness of thegetRundown
function usage.Ensure that the
getRundown
function is correctly used in thethis.eventTimer.roll
call. This change seems to be correctly adding therundown
parameter to theroll
call.
557-559
: Verify the correctness of thegetRundown
function usage.Ensure that the
getRundown
function is correctly used in theruntimeState.resume
call. This change seems to be correctly adding therundown
parameter to theresume
call.
629-631
: Verify the correctness of thecurrentBlock
object usage.Ensure that the
currentBlock
object is correctly used in the event store. This change seems to be correctly adding thecurrentBlock
object to the event store.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Outside diff range, codebase verification and nitpick comments (1)
apps/server/src/services/timerUtils.ts (1)
147-148
: Ensure consistent usage of the renamed parameter.The parameter renaming from
rundown
toplayableEvents
is not consistent throughout the file. The following instances ofrundown
andrundownEvent
need to be updated:
filteredRundown
should be renamed tofilteredPlayableEvents
.rundownEvent
should be renamed toplayableEvent
.Locations:
apps/server/src/services/timerUtils.ts
Please update these instances to ensure consistent usage of the renamed parameter.
Analysis chain
Ensure consistent usage of the renamed parameter.
The logic has been updated to use
playableEvents
instead ofrundown
. Verify that the parameter renaming is consistent throughout the function.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify consistent usage of the renamed parameter `playableEvents`. # Test: Search for the usage of `playableEvents` in the function. Expect: No occurrences of the old parameter name `rundown`. rg --type-add 'ts' --type ts 'playableEvents' -A 5Length of output: 108
Script:
#!/bin/bash # Description: Verify consistent usage of the renamed parameter `playableEvents`. # Test: Search for the usage of `playableEvents` and `rundown` in the relevant file. rg 'playableEvents' apps/server/src/services/timerUtils.ts rg 'rundown' apps/server/src/services/timerUtils.tsLength of output: 1083
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
packages/utils/index.ts
is excluded by none and included by none
Files selected for processing (8)
- apps/server/src/services/TimerService.ts (2 hunks)
- apps/server/src/services/rundown-service/RundownService.ts (2 hunks)
- apps/server/src/services/runtime-service/RuntimeService.ts (9 hunks)
- apps/server/src/services/timerUtils.ts (2 hunks)
- apps/server/src/stores/tests/runtimeState.test.ts (3 hunks)
- apps/server/src/stores/runtimeState.ts (14 hunks)
- packages/utils/src/rundown-utils/rundownUtils.test.ts (2 hunks)
- packages/utils/src/rundown-utils/rundownUtils.ts (2 hunks)
Files skipped from review as they are similar to previous changes (4)
- apps/server/src/services/TimerService.ts
- apps/server/src/services/runtime-service/RuntimeService.ts
- apps/server/src/stores/runtimeState.ts
- packages/utils/src/rundown-utils/rundownUtils.ts
Additional comments not posted (8)
apps/server/src/stores/__tests__/runtimeState.test.ts (3)
101-101
: LGTM!The added assertion ensures that
newState.currentBlock.block
is correctly set tonull
after loading an event.
171-171
: LGTM!The added assertion ensures that
newState.currentBlock.block
is correctly set tonull
after loading an event in the runtime offset test.
203-203
: LGTM!The added assertion ensures that
newState.currentBlock.block
is correctly set tonull
after loading an event in the runtime offset test.apps/server/src/services/rundown-service/RundownService.ts (2)
28-35
: Improved readability!The reformatting of the
CompleteEntry
type enhances code readability without altering functionality.
244-244
: Verify the impact of the logic change.The modification to pass only the
affected
variable toruntimeService.maybeUpdate
suggests a shift in logic. Ensure that this change does not negatively impact the notification process to the timer service.packages/utils/src/rundown-utils/rundownUtils.test.ts (2)
5-13
: LGTM!The addition of the
getRelevantBlock
function to the imports is necessary for the new tests.
268-322
: Enhanced test coverage!The new test suites for
relevantBlock
andfilter event
functions significantly improve the test coverage for therundownUtils
module.apps/server/src/services/timerUtils.ts (1)
133-137
: LGTM! Parameter renaming improves clarity.The parameter
rundown
has been renamed toplayableEvents
, which enhances clarity by better reflecting the purpose of the argument.
Hi @alex-Arc , what is the status here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- apps/server/src/services/runtime-service/RuntimeService.ts (9 hunks)
- apps/server/src/stores/tests/runtimeState.test.ts (3 hunks)
- apps/server/src/stores/runtimeState.ts (15 hunks)
Files skipped from review as they are similar to previous changes (2)
- apps/server/src/services/runtime-service/RuntimeService.ts
- apps/server/src/stores/tests/runtimeState.test.ts
Additional context used
GitHub Check: unit-test
apps/server/src/stores/runtimeState.ts
[failure] 198-198: src/stores/tests/runtimeState.test.ts > mutation on runtimeState > playback operations > normal playback cycle
TypeError: Cannot read properties of null (reading 'id')
❯ loadNow src/stores/runtimeState.ts:198:85
❯ Module.load src/stores/runtimeState.ts:171:3
❯ src/stores/tests/runtimeState.test.ts:96:7
[failure] 198-198: src/stores/tests/runtimeState.test.ts > mutation on runtimeState > playback operations > runtime offset
TypeError: Cannot read properties of null (reading 'id')
❯ loadNow src/stores/runtimeState.ts:198:85
❯ Module.load src/stores/runtimeState.ts:171:3
❯ src/stores/tests/runtimeState.test.ts:170:7
Additional comments not posted (8)
apps/server/src/stores/runtimeState.ts (8)
100-102
: LGTM! The changes ensure correct state reset.The updates to reset
currentBlock
and_prevCurrentBlock
in theclear
function are appropriate and necessary.
156-162
: LGTM! The changes are consistent with the updated logic.The modifications to the
load
function to includeplayableEvents
andrundown
parameters are appropriate and necessary for handling the newcurrentBlock
logic.
235-235
: LGTM! The changes are consistent with the updated logic.The modifications to the
loadNext
function to usefilterPlayable
and handle thecurrentBlock
logic are appropriate and necessary.
268-268
: LGTM! The changes are consistent with the updated logic.The modifications to the
resume
function to includeplayableEvents
andrundown
parameters are appropriate and necessary for handling the newcurrentBlock
logic.
311-313
: LGTM! The changes are consistent with the updated logic.The modifications to the
reloadAll
function to includeplayableEvents
andrundown
parameters are appropriate and necessary for handling the newcurrentBlock
logic.
338-341
: LGTM! The changes are consistent with the updated logic.The modifications to the
start
function to setcurrentBlock.startedAt
if it is null are appropriate and necessary for handling the newcurrentBlock
logic.
481-482
: LGTM! The changes are consistent with the updated logic.The modifications to the
roll
function to includeplayableEvents
andrundown
parameters are appropriate and necessary for handling the newcurrentBlock
logic.
479-479
: LGTM! The changes are consistent with the updated logic.The modifications to the
update
function to handle the newcurrentBlock
logic are appropriate and necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (1)
- apps/server/src/stores/runtimeState.ts (15 hunks)
Files skipped from review as they are similar to previous changes (1)
- apps/server/src/stores/runtimeState.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this looks good, we need to find a way to show this in the interface (maybe the overview panel?) but lets do that in another PR
Adds block info to the runtimeStore