REPOSITORY CODING · HARD
Keep rejected subtitle splits out of the document
A rejected split can leave half a caption committed, and invalid new cue IDs survive validation. Trace identifier validation and split commit order. Validate both resulting cues and the expected document revision before changing either the cue map or revision. A successful split increments the revision once; a rejected one must preserve the complete snapshot.
Architecture ExtensionSubtitle editing service
Work through a real codebase.
Choose an environment, investigate the existing implementation and use the tests to check your change. Sign in to open a workspace; execution and Ono usage follow your plan’s allowances.
Task requirements and environments
JavaScript · 75 minute session
- Times are integer milliseconds. Cue intervals include the start and exclude the end. IDs are unique within a document. Commands execute in order and return either a value or an error.
- Shift moves every selected start and end by the same signed delta. Validate the entire selection and expected revision before committing. No cue may start before zero.
- Layout preserves explicit line breaks and wraps on whitespace. Count Unicode code points; do not split long words. Width must be an integer from 1 to 120.
- Conflicts reports every overlapping pair within the same track, including nested cues. Adjacent cues and different tracks do not conflict. Order results by overlap start, then the sorted IDs.
- Snapshot cues are ordered by start, then end, then ID. Split, export, add and remove must keep their existing behavior. This service processes document batches, not collaborative edits.
React · 75 minute session
- Times are integer milliseconds. Cue intervals include the start and exclude the end. IDs are unique within a document. Commands execute in order and return either a value or an error.
- Shift moves every selected start and end by the same signed delta. Validate the entire selection and expected revision before committing. No cue may start before zero.
- Layout preserves explicit line breaks and wraps on whitespace. Count Unicode code points; do not split long words. Width must be an integer from 1 to 120.
- Conflicts reports every overlapping pair within the same track, including nested cues. Adjacent cues and different tracks do not conflict. Order results by overlap start, then the sorted IDs.
- Snapshot cues are ordered by start, then end, then ID. Split, export, add and remove must keep their existing behavior. This service processes document batches, not collaborative edits.