* fix error with is linked to loaded metadata
* pass down metadata
* create expected schedule
* expected start in sub info
* for singel subscribtions
* refactor
* add color to single events
* refactor: clean up subscribtion data
* show schedule and secondray data for single events
* improve subscribtion data display
with this changes we allow the client and server to share the same data
shape. even if some of it is useless.
we also get an extra version property in the payload, if we want to save
the transfer cost, we would rather remove it from the sent payload
* refactor: align header columns
* refactor: improve scrollbar visibility
* refactor: center align table elements
* refactor: make param elements stateful
* fix: issue with collapsed elements not loosing value
* fix: prevent search params containing multiple alias references
* fix: the issue where a file disappears if it is both migrated and recovered in the same load operation (#1744)
* refactor: disable group action for elements in groups
* refactor: move context menu items into the event element (#1747)
* feat: sheet import new features for v4 (#1730)
* import milestone
* fixup! import milestone
* test: milestone import
* add entries to group
stop on new group or on group-end type
* fixup! add entries to group
* cleanup
* add event target duration
* link start if undefined
* add skip import type
* extract some to the excel paresing functions
* tweaks to presentation
* move file
---------
Co-authored-by: Carlos Valente <carlosvalente@pm.me>
* fix: notify runtimeStore of events bieng groupd
* fix: improve authentication and stage detection in demo
* chore: ship logo with project
* fix: client is referenced by name
* fix: prevent reflow in event editor
* fix: stale render on selected event due to ref mismatch
* Create/Load/Delete multiple rundowns (#1696)
* refactor: restore last loaded rundown
* refactor: initialise rundown in ProjectService
* feat: allow switching rundowns
ensure on coordination between the db object and the working object
server provide list of rundowns
implement switch in the UI
implement delete
implement new rundown button
* fix: render order for floating button
* refactor: appropriate names to service
* refactor: rundown endpoints
* refactor: save last loaded rundown ID
* refactor: rundown management UI
* refactor: emit refetch all on project load
---------
Co-authored-by: Carlos Valente <carlosvalente@pm.me>
* feat: recover single event subscription
* fixup! feat: sheet import new features for v4 (#1730)
* fix: prevent dropping a group inside another
* fixup! refactor: move context menu items into the event element (#1747)
* fix: prevent stale references to custom fields
* fix: propagate updates to all rundowns
* refactor: client rundown metadata (#1728)
* generate metadata in the hook
* move test
* ensure there is always a last element
* use for-loop
* update metadata in useEfect
* fully extract metadata generation
* use direct assignment
* cleanup
---------
Co-authored-by: Carlos Valente <carlosvalente@pm.me>
* refactor: small imporvement and tests for coerce functions (#1752)
* refactor: small imporvement and tests for coerce functions
add test `coerceString`
add test `coerceBoolean`
add test `coerceColour`
* remove old todo
* fix: consistent quick add behaviour
* refactor: create flat rundown with metadata
* fix: show add buttons on top
* feat: allow editing milestones
* refactor: style tweaks to rundown elements
refactor: milestones are full width
refactor: cuesheet header alignment
fix: editor styling in cuesheet
* refactor: virtualise table
* refactor: improve overscan (#1758)
* bump version to 4.0.0-alpha.5
---------
Co-authored-by: Alex Christoffer Rasmussen <ac@omnivox.dk>
The IntersectionObserver callback in rowObserver.ts was capturing the `addVisibleRow` and `removeVisibleRow` actions from the Zustand store only once, at the time of the observer's creation.
This created a potential for a stale closure bug, where the observer would call outdated action functions if the store's state or actions were ever re-initialized. This would lead to the application's state not being updated correctly, causing the bug where visible rows would not render their content.
This commit fixes the issue by calling `useVisibleRowsStore.getState()` inside the observer callback. This ensures that the latest, freshest versions of the action functions are always used, preventing the stale state bug.
* refactor: runtime types
* refactor: runtimeState functions to use the split type
* refactor: RuntimeService to use the new split data
* refactor: use the split data in the UI
* update comments
* refactor: rename runtime to offset
* fix utils test
* migrate settings
* migrate viewsettings
* migrate url preset
* migrate project data
* migrate custom fields
* migrate automations
* migrate rundown
* lint
* return custom field translation table
* check regex
* new url type
* refactor
* migrate old OSC subscriptions
* migrate old http subscriptions
* update comments
* migrate the whole db
* remove automation logging unlis there is an error
* return a new object
* refactor: copy currup is only used in one place
* make a copy of original migrated file
* refactor: ensure image flder is part of project service init
* add entrys to groups
* small cleanup
* just drop incorrect custom fields in the default data parser
* refactor: split event data and state data
* refactor: calculate the start time insted of until
* cleanup
* send next flag expected start from server
* refactor: render
* fix test
* use same icon
* refactor: group duration
* Optimize (#1711)
* refactor: consolidate block, flag and end loading and expected times
* work on test
* cal end value
* lint
* fix test
* remove todo
Updated DEVELOPMENT.MD to use `turbo run <task>` instead of `turbo <task>` for clarity and consistency when referring to Turborepo tasks that don't have a direct pnpm script alias.
Also, added `dependsOn: ["build"]` to `dist-*` tasks in `turbo.json` to ensure correct build order before packaging.
- italic and bold for rundown metadata entries
- allow deleting groups
- make groups in order
- correct style for milestones
- open playing groups
- style tweaks
* switch to base ui
* ensure all action types is part of the valitation
* update test
* atempt to do it in the base-ui way
* fix fixing
* allow undefide visible on set timer message
* fix set time not showing
* correct time data for aux set automation
---------
Co-authored-by: Carlos Valente <carlosvalente@pm.me>
fix: close modal with button
refactor: small type improvements
refactor: migrate time inputs
refactor: migrate tooltips
refactor: prevent component resizing
* Refactor: Remove GOT dependency, use simplified fetch wrapper
Replaced GOT with a lightweight, functional, fetch-based utility (`appClient.ts`) for handling JSON POST requests in `SheetService.ts`.
- Created `appClient.ts` to encapsulate fetch logic. It mimics GOT's behavior for sending JSON payloads and parsing JSON responses.
- Error handling in `appClient.ts` uses standard `Error` objects with descriptive messages, including status and error body details, instead of custom error types.
- Updated `SheetService.ts` to use the new `appClient.ts`.
- Removed `got` from server dependencies.
* cleanup
* dont throw when we know the error
* rearange logging
---------
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Co-authored-by: arc-alex <ac@omnivox.dk>
Decouples the IntersectionObserver from the React component tree to
prevent
unnecessary re-renders of the entire Cuesheet table when row visibility
changes. Restores rootMargin for better UX and memoizes EventRow.
- Introduced `rowObserver.ts` to manage a global IntersectionObserver.
- Observer callback directly updates `useVisibleRowsStore`.
- Configured with `rootMargin: '400px 0px'` and `threshold: 0.01`
to pre-load and retain rows near the viewport, improving UX.
- `EventRow` components use `observeRow`/`unobserveRow` from
`rowObserver.ts`.
- `EventRow` is now wrapped in `React.memo` to prevent re-renders if
props
haven't changed when its parent re-renders.
- Removed observer creation and prop-drilling from `CuesheetBody.tsx`.
This ensures only individual rows re-render content based on visibility
and optimizes row component rendering, improving performance and UX.
* adding block now/next data
* add to ui
* add blockNext
* indicate in UI
* fix test
* restore block start at value
* one loop
* stricter null comparison
* test fails
* dev throw if id cant be found
* fix spelling
* revert client stuff
* rename
* add comment
* change load to use metadata
* update roll to use metadata
* remove filterTimedEvents
* add comment
* atempth to refactor rollUtils
* refactor util functions
* refactor: WS
* refactor refetch
extract refetch keys to package/types
auto invalidata all keys
use refetch keys for project data
no need for constant update of info, just fetch when looking at it
split refetch and query keys
rename types
* refactor viewSettings
* fixup! refactor: WS
* rearange files and make types for api calls
* cleanup viewsettings
* switch exhaustiveCheck
* combine send socket function
* exhaustive check
* rename type to tag
* fixup! fixup! refactor: WS
* remove custom etag solution
* get errors from socket
* lint
* small change
---------
Co-authored-by: Carlos Valente <carlosvalente@pm.me>
* creat failing test
* find and pass index of eventNow in case it moved
* fix cache invalidate edits should also recalculate timer
* use coluor as test indicator
* fixed empty cue guard
Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
---------
Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
* upgrade expressjs
* migration
* reenable test
* extend timeout on download test
* fixup! migration
* move empty body test from controller to validator
* enusre not empty
* extract validation function
* fixup! reenable test
* remove thin controllers
* disable e2e test of project file download
The `applyDelay` function had a condition that incorrectly used `rundown.order.length` instead of `rundownMetadata.flatEntryOrder.length` to check if a delay entry was the last in the sequence. `rundown.order` only contains top-level entries, while `flatEntryOrder` contains all entries, including those within blocks, which is the relevant list for this check.
This commit corrects the condition to use `rundownMetadata.flatEntryOrder.length`.
Existing tests in `rundown.dao.test.ts` (specifically the test `removes delays in last position without applying changes`) already cover this scenario and pass with the correction, ensuring the fix behaves as expected.
* fix: generateUniqueFileName
* loadProject should not generate new names
* update comments
* extract and test getProjectNumber
* spell
* finish jsdoc
* use getProjectNumber
* cleanup loadProject
* create a `incrementProjectNumber` function
* spelling
Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
---------
Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
* refactor
* separate in and out time
* keep element on screen
* animate on play
* spelling
* explain animation decisions
* guard numbers from url params
* spelling
Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
* rename safeParseNumber
* use view data
* refactor getOptionsFromParams
* rebalance animation timing
---------
Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
* inti relative mode
* send imediat update on mode change
* add relative to test
* don't persist offset mode
* add test relative and update calc function
* pass data from ssocket
* add dev guard
* spelling and comments
* show relative in offset overview
* remove comments
* refactor: move totalDelay to _rundown
* update clear naming and comments
* remove old testing values
* crude UI
* add server functionalety
* better event trigger list
* fix default value
* remove log
* add trigger to recalculate whitelist
* use DTO type
* fix rebase
* one callback for delete and submit
* refactor
* add invalid description
* clean up commits
* cleanup
* refactor: find event triggers in `triggerAutomations`
* refactor: switch to flat array for event triggers
* prevent deleting a automation that is in use
* refactor
* refactor: extract EventEditorCustom
* move trigger options to separate file
* move trigger edit down a file level
* cleanup
* spelling
* refactor: ui review proposal
* change default value
* fix delete filter
---------
Co-authored-by: Carlos Valente <carlosvalente@pm.me>
* create report service
* write report from runtimeState
* use in UI
* clear report
* update types
* clear all from settings menu
* rearence rightclik menu
* refactor styling
* also report roll events
* ontime/under time is same colour
* refactor reporter
* add target to ontime-refetch
* remove menu
* fectch only on message from server
* memo useGetEventReport
* refactor
* use staleTime
* dont add to menu yet
* implement review
* clear all from menu
* fix merge
* start end show
* combine test for the go button text and action
* add report to menu
* extract csv utility
* report management
* unneeded async
* small refacort of triggerReportEntry
---------
Co-authored-by: Carlos Valente <carlosvalente@pm.me>
refactor: improve empty state
refactor: review schedule design
- fit as many elements as possible
- expose cycle interval as an option
- stabilise rundown reference
- style tweaks
welcome modal is persisted in app state
created endpoints to set the visibility
added UI to support feature
Co-authored-by: Carlos Valente
<34649812+cpvalente@users.noreply.github.com>
* add dayOffset to OntimeEvent
* refactor: isNewLatest
* calculate totalDays
* refactor: getTimeFromPrevious
* add gap as dataset in OntimeEvent
* use in ui
* format overlap is just a simple text formatting, big test is not needed
* add new fields where needed
* update apply delay
* show nex day eaven if there is no gap
* create test
* use buildin day offset in timeline
* remove todo
* consistent naming
* make a calculateDayOffset util for rundownCache
* refactor: checkIsNextDay to use dayOffset
* spelling
Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
* remove unneeded test
* remove todo
* update test db
* use data-testid
* spelling
Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
* update comments
* remove null option
---------
Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
* create db event type
* dont use it yet
* convert to and from database type
* type needed in one place in client
* use flatMap to filter out unknow stuff
* leave revision in save file
* move to utils
* make test
* destructur entry
* simple test
* throw in rundownToDatabaseRundown
* clerify comment
* Refactor: avoid shadowing the rundown variable in rundownCache (#1409)
---------
Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
* rename to DAO
* add simple edit test
* only the generate function clears the state state
* strict guard for custom fields
* fix small strict issues
* ensure deep copy
* safely set isStale
* todo is done
* small type error
* these functions can work on DAO entries
* only reat rundown as DAO on initial load and the cast immediately and esure all fields are present
* eslint comment
Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
* fix spelling
Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
* fix spelling
Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
* comment not needed
* setIsStale
* remove DAO
* clean up commits
* remove unneeded async/await
* revert test
---------
Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
* detect `EADDRINUSE` on server start
* @ts-expect-error
* send portError to electron
* use escalateErrorFn
* dont move in docker
* allow errors to be sendt to electron UI
* Log after the new port is found
* Update comment
Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
* update comment
Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
* update comment
Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
* rename to escalate
* extract `serverTryDesiredPort`
* type check server.address()
* request shutdown on `unrecoverable` `escalateError`
* combine network utils
* reject promise
* not unrecoverable by default
* unneeded assignment
---------
Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
* pass on all event edits
* MakePublic
* trim value in cell
* edit notes
* title
* add key check
* don't log error
Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
* checkbox
* refactor
* remove log
* fix test
* use row number to test value
---------
Co-authored-by: Carlos Valente <34649812+cpvalente@users.noreply.github.com>
* feat: add lock icon when param `locked=true`
* chore: move `isViewLocked` logic up the component tree
* chore: remove extra container from lock icon
* chore: move fading logic into separate hook
* chore: move locked icon into separate component
* chore: rename variables
* use xlsx
* add existing custom fields to import map
* keep colours of existing custom fields
* use unknown
* fix
* revert
* allow space and upper case
* fix test
* define empty sheet
* remove custom field lowercasing
* don't allow custom field form to submit duplicate field
* remove unused
* update custom field tests
* also keep upper case when editing
* show key in UI
* also kep upper case when creating a new field
* fix test
* allow old forced case keys to stay as is
* allow space
* add extension to import
* supply initial key to CustomFieldForm
* refactor: improve element contrast
* refactor: style and composition
* consistent use of `customFieldLabelToKey`
* fix CopyTag
* remove log
---------
Co-authored-by: arc-alex <ac@omnivox.dk>
Co-authored-by: Carlos Valente <carlosvalente@pm.me>
* Revert "refactor: allow messages not starting with http"
This reverts commit 887e5c448e.
* Revert "refactor: allow messages not starting with http"
This reverts commit 6ce275da7a.
@@ -9,8 +9,8 @@ Ontime consists of 3 distinct parts
The steps below will assume you have locally installed the necessary dependencies.
Other dependencies will be installed as part of the setup
- __node__ (~20)
- __pnpm__ (~9)
- __node__ (~22)
- __pnpm__ (~10)
- __docker__ (only necessary to run and build docker images)
## LOCAL DEVELOPMENT
@@ -20,19 +20,20 @@ development.
Locally, we would need to run both the React client and the node.js server in development mode
From the project root, run the following commands
- __Install the project dependencies__ by running `pnpm i`
- __Run dev mode__ by running `turbo dev`
- __Run dev mode__ by running `pnpm turbo dev`
### Debugging backend
To debug backend code in Node.js:
The previous command will start the development servers for both the client, server and electron applications.
Typically in dev mode we prefer to start these in separate terminals to help with error tracking and debugging.
- Open two separate terminals and navigate to the `apps/client` and `apps/server` directories.
-In each terminal, run the command `pnpm dev` to start the development servers for both the client and server
applications.
- If you need to set breakpoints and inspect the code execution, enable Node.js inspect mode by
running `pnpm dev:inspect`.
We do that by creating two terminals an running
-__Run the React UI__ by running `pnpm turbo dev --filter=ontime-ui`
- __Run the nodejs server__ by running `pnpm turbo dev --filter=ontime-server`
- If you need to set breakpoints and inspect the code execution, enable Node.js inspect mode by running `pnpm turbo dev:inspect --filter=ontime-server`.
## TESTING
@@ -45,7 +46,7 @@ Generally we have 2 types of tests.
Unit tests are contained in mostly all the apps and packages (client, server and utils)
You can run unit tests by running turbo `turbo test:pipeline` from the project root.
You can run unit tests by running `pnpm turbo test:pipeline` from the project root.
This will run all tests and close test runner.
Alternatively you can navigate to an app or project and run `pnpm test` to run those tests in watch mode
@@ -76,13 +77,13 @@ You can generate a distribution for your OS by running the following steps.
From the project root, run the following commands
- __Install the project dependencies__ by running `pnpm i`
- __Build the UI and server__ by running `turbo build:electron`
- __Create the package__ by running `turbo dist-win`, `turbo dist-mac` or `turbo dist-linux`
- __Build the UI and server__ by running `pnpm turbo run build:electron`
- __Create the package__ by running `pnpm turbo run dist-win`, `pnpm turbo run dist-mac` or `pnpm turbo run dist-linux`
The build distribution assets will be at `.apps/electron/dist`
Note: The MacOS build will only work in CI, locally it will fail due to notarisation issues.
Use the `turbo dist-mac:local` command to build a MacOS distribution locally.
Use the `pnpm turbo run dist-mac:local` command to build a MacOS distribution locally and skip the notary process.
## DOCKER
@@ -91,7 +92,7 @@ While it should allow for a generic setup, it might need to be modified to fit y
- __Run docker image from compose__ by running `docker-compose up -d`
Other useful commands
@@ -99,9 +100,15 @@ Other useful commands
- __List running processes__ by running `docker ps`
- __Kill running process__ by running `docker kill <process-id>`
## General Info
## CONTRIBUTION GUIDELINES
# APP Building
If you want to propose changes to the codebase, please reach out before opening a Pull Request.
We build the app from app.js for almost all applications. The output file will still be named index.cjs. This is because of Electron.
Building the app from index.ts only applies for applications that don't use electron. index.ts will take over the initialization of the server and UI when electron isn't present.
For new PRs, please follow the following checklist:
* [ ] You have updated and ran unit locally and they are passing. Unit tests are generally created for all utility functions and business logic
* [ ] You have ran code formatting and linting in all your changes
* [ ] The branch is clean and the commits are meaningfully separated and contain descriptive messages
* [ ] The PR body contains description and motivation for the changes
After this checklist is complete, you can request a review from one of the maintainers to get feedback and approval on the changes. \
- Download for <a href="https://github.com/cpvalente/ontime/releases/latest/download/ontime-macOS-arm64.dmg">MacOS Arm</a>
- Download for <a href="https://github.com/cpvalente/ontime/releases/latest/download/ontime-macOS-x64.dmg">MacOS Intel</a>
- Download AppImage for <a href="https://github.com/cpvalente/ontime/releases/latest/download/ontime-linux.AppImage">Linux</a>
... or
- Get from <a href="https://hub.docker.com/r/getontime/ontime">Docker hub</a>
- Install from <a href="https://www.npmjs.com/package/ontime">NPM</a>
- Install from <a href="https://formulae.brew.sh/cask/ontime">Homebrew</a>
## Need help?
We do our best to have most topics covered by the documentation. However, if your question is not covered, you are welcome to [fill in a bug report in an issue](https://github.com/cpvalente/ontime/issues), [ask a question in GitHub discussions](https://github.com/cpvalente/ontime/discussions) or hop in the [discord server](https://discord.com/invite/eje3CSUEXm) for a chat.
## Using Ontime?
Let us know!
Ontime improves from the collaboration with its users. We would like to understand how you use Ontime and appreciate your feedback.
@@ -35,6 +42,16 @@ Ontime is made by entertainment and broadcast engineers and used by
- Theatres and opera houses
- Houses of worship
## Main features
- **Multiplatform**: Available as a Cloud service and for Windows, macOS, Linux, or self-hosted via Docker.
- **In any device**: Ontime is available to any device with a browser, eg: tablets, mobile phones, laptops, signage, media servers...
- **Team Collaboration**: Dedicated views for directors, operators, backstage, and signage.
- **Real-Time Updates**: Manage and communicate runtime delays effortlessly.
- **Automatable**: Ontime can be fully or partially controlled by an operator, or run standalone with the system clock
- **Flexible Integrations**: Use one of the APIs provided (OSC, HTTP, Websocket) or the available [Companion module](https://bitfocus.io/connections/getontime-ontime) to integrate into your workflow (vMix, disguise, Qlab, OBS)
... and a lot more ...
### For live environments
Ontime is designed for use in live environments. \
@@ -62,96 +79,29 @@ Ontime is made by video engineers and entertainment technicians.
## Using Ontime
Ontime can be started by downloading the latest release for your platform. \
Alternatively you can also use the docker image, available at [Docker Hub](https://hub.docker.com/r/getontime/ontime)
### Getting started
Once installed and running, any device in the network has access to Ontime.
The easiest way to start with Ontime is by leveraging our [Cloud service](https://getontime.no). \
This will give you immediate access to running instances of Ontime which are available to share with anyone with an internet connection.
Ontime provides different screens which allow for different types of interactions with the data. These are called
views. \
Each view in Ontime focuses on empowering a specific role or achieving a particular task.
Alternatively, you can run Ontime locally for free by downloading the latest release for your platform or using the docker image, available at [Docker Hub](https://hub.docker.com/r/getontime/ontime)
You can access the different views by reaching the ontime server, in your browser, at (_default port
4001_) `http://localhost:4001` or `http://192.168.1.3:4001`
Once installed and running, any device that shares the same network as Ontime will have access to Ontime.
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.