Skip to content

Conversation

@jacob-keller
Copy link

Add new blockbegin and blockend keywords for the timeline file.
These implement basic "block" support by allowing a timeline to identify
collections of entries that belong together.

To start a block, the timeline should use blockbegin "name" where
"name" is a unique block name. This also creates an implicit label for
the start of the block.

To end a block the blockend keyword on its own line should be used.

To avoid complexity with making the actual timeline logic handle blocks,
implement support via a clever hack in the timeline parser to offset all
entries.

Keep track of the current block, and the largest time offset found so
far. When a blockbegin keyword is found, use the largest known offset
to generate a new "offset". To ensure a decent gap, add 500 seconds to
that time then round up to the next multiple of 1000.

For all entries until the next blockend, add this offset to their
encoded time. This essentially automatically offsets blocks in the
timeline instead of requiring manual offset configuration. Entries
outside of blocks do not get modified.

For jumps by label, add "block scoping" where a label is prefixed by the
blockname separated by a ':'. Currently no timelines actually use ':' in
their label name so this should be safe.

A jump with a ':' in its name will always jump to the block label
without implicit handling. Labels without ':' will get implicit handling
in the following priority, with the first existing option being chosen

  1. A label within the same block
  2. A label outside any block
  3. The start of a block by name

This means that timeline files can re-use labels across blocks, and that
blocks get implicit labels that do not override explicit ones.

This solution is very much a hack, but it avoids a massive refactor that
would be required for explicit block handling within many parts of the
codebase.

Signed-off-by: Jacob Keller jacob.keller@gmail.com

Add new `blockbegin` and `blockend` keywords for the timeline file.
These implement basic "block" support by allowing a timeline to identify
collections of entries that belong together.

To start a block, the timeline should use `blockbegin "name"` where
"name" is a unique block name. This also creates an implicit label for
the start of the block.

To end a block the `blockend` keyword on its own line should be used.

To avoid complexity with making the actual timeline logic handle blocks,
implement support via a clever hack in the timeline parser to offset all
entries.

Keep track of the current block, and the largest time offset found so
far. When a `blockbegin` keyword is found, use the largest known offset
to generate a new "offset". To ensure a decent gap, add 500 seconds to
that time then round up to the next multiple of 1000.

For all entries until the next `blockend`, add this offset to their
encoded time. This essentially automatically offsets blocks in the
timeline instead of requiring manual offset configuration. Entries
outside of blocks do not get modified.

For jumps by label, add "block scoping" where a label is prefixed by the
blockname separated by a ':'. Currently no timelines actually use ':' in
their label name so this should be safe.

A jump with a ':' in its name will always jump to the block label
without implicit handling. Labels without ':' will get implicit handling
in the following priority, with the first existing option being chosen

1) A label within the same block
2) A label outside any block
3) The start of a block by name

This means that timeline files can re-use labels across blocks, and that
blocks get implicit labels that do not override explicit ones.

This solution is very much a hack, but it avoids a massive refactor that
would be required for explicit block handling within many parts of the
codebase.

Signed-off-by: Jacob Keller <jacob.keller@gmail.com>
@cactbotbot
Copy link
Collaborator

cactbotbot commented Dec 20, 2025

@jacob-keller Thanks for your contribution! 🌵🚀

@github-actions github-actions bot added docs /docs, /screenshots, *.md raidboss /ui/raidboss module test /test, /ui/test labels Dec 20, 2025
@jacob-keller jacob-keller changed the title timeline: add support for timeline blocks raidboss: add support for timeline blocks Dec 20, 2025
@jacob-keller
Copy link
Author

I am not certain if this is the best path, but its definitely the simplest path to getting timeline blocks working. I don't think I'd have the energy to properly refactor all of the mess that makes timelines work, and this solution basically automates what our existing timelines had to do manually.

@jacob-keller
Copy link
Author

@xiashtra would like your opinion on this when you get a chance

@xiashtra
Copy link
Collaborator

@xiashtra would like your opinion on this when you get a chance

I'm not going to have time to give this the attention it deserves until after the holidays, unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs /docs, /screenshots, *.md raidboss /ui/raidboss module test /test, /ui/test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants