<commit_before>{{!--
  It's important for the modal to have focus at the start of
  its content. See examples at https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/dialog.html
  Much of our content is gradually loaded and animated
  so it doesn't seem good for us to delay focus till then,
  hence the root of the workflow has tabindex=-1 to make it focusable
  and we focus it when it's rendered. We don't want it to be focusable
  after that.
--}}
<Boxel::Thread
  @autoscroll={{this.autoscroll}}
  class="workflow-thread workflow-thread-animated"
  tabindex="-1"
  {{did-insert this.focus}}
  {{did-insert this.scrollToEnd}}
  data-test-workflow-thread
  style={{css-var thread-animation-interval=this.cssThreadAnimationInterval}}
  ...attributes
>
  <:header>
    <Common::DegradedServiceBanner class="workflow-thread__degraded-service-banner" />
    <Boxel::ThreadHeader @title={{this.workflow.displayName}}>
      {{#if @onClose}}
        <Boxel::Button
          @size='extra-small'
          {{on 'click' @onClose}}
          data-test-return-to-dashboard
        >
          Return to Dashboard
        </Boxel::Button>
      {{/if}}
    </Boxel::ThreadHeader>
  </:header>
  <:content>
    {{#if (has-block 'before-content')}}
      {{yield to='before-content'}}
    {{/if}}
    {{#each this.workflow.visibleMilestones as |milestone i|}}
      {{#each milestone.visiblePostables as |postable j|}}
        <WorkflowThread::Postable
          @postable={{postable}}
          @previous={{object-at milestone.visiblePostables (dec j)}}
          @frozen={{this.frozen}}
          @index={{j}}
          data-test-milestone={{i}}
        />
      {{/each}}
      {{#if milestone.isComplete}}
        <Boxel::MilestoneBanner
          @title={{milestone.completedDetail}}
          @status={{if (eq i (dec this.workflow.milestones.length)) "Workflow completed" "Milestone reached"}}
          class="workflow-milestone-banner-animated"
          data-milestone={{i}}
          data-test-milestone-completed
          data-test-milestone={{i}}
        />
        {{sentry-breadcrumb
          message=(concat "Milestone completed: " this.workflow.displayName " → " milestone.title)
        }}
      {{/if}}
    {{/each}}
    {{#if this.workflow.isComplete}}
      {{#each this.workflow.epilogue.visiblePostables as |postable j|}}<commit_msg>Frozen w milestone and postable editability<commit_after>{{!--
  It's important for the modal to have focus at the start of
  its content. See examples at https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/dialog.html
  Much of our content is gradually loaded and animated
  so it doesn't seem good for us to delay focus till then,
  hence the root of the workflow has tabindex=-1 to make it focusable
  and we focus it when it's rendered. We don't want it to be focusable
  after that.
--}}
<Boxel::Thread
  @autoscroll={{this.autoscroll}}
  class="workflow-thread workflow-thread-animated"
  tabindex="-1"
  {{did-insert this.focus}}
  {{did-insert this.scrollToEnd}}
  data-test-workflow-thread
  style={{css-var thread-animation-interval=this.cssThreadAnimationInterval}}
  ...attributes
>
  <:header>
    <Common::DegradedServiceBanner class="workflow-thread__degraded-service-banner" />
    <Boxel::ThreadHeader @title={{this.workflow.displayName}}>
      {{#if @onClose}}
        <Boxel::Button
          @size='extra-small'
          {{on 'click' @onClose}}
          data-test-return-to-dashboard
        >
          Return to Dashboard
        </Boxel::Button>
      {{/if}}
    </Boxel::ThreadHeader>
  </:header>
  <:content>
    {{#if (has-block 'before-content')}}
      {{yield to='before-content'}}
    {{/if}}
    {{#each this.workflow.visibleMilestones as |milestone i|}}
      {{#each milestone.visiblePostables as |postable j|}}
        <WorkflowThread::Postable
          @postable={{postable}}
          @previous={{object-at milestone.visiblePostables (dec j)}}
          @frozen={{or this.frozen (not milestone.isEditable) (not postable.isEditable)}}
          @index={{j}}
          data-test-milestone={{i}}
        />
      {{/each}}
      {{#if milestone.isComplete}}
        <Boxel::MilestoneBanner
          @title={{milestone.completedDetail}}
          @status={{if (eq i (dec this.workflow.milestones.length)) "Workflow completed" "Milestone reached"}}
          class="workflow-milestone-banner-animated"
          data-milestone={{i}}
          data-test-milestone-completed
          data-test-milestone={{i}}
        />
        {{sentry-breadcrumb
          message=(concat "Milestone completed: " this.workflow.displayName " → " milestone.title)
        }}
      {{/if}}
    {{/each}}
    {{#if this.workflow.isComplete}}
      {{#each this.workflow.epilogue.visiblePostables as |postable j|}}
{'fraction_non_alphanumeric': 0.14583333333333334, 'fraction_numerical': 0.00125, 'mean_word_length': 2.8748991121872476, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5136557', 'n_tokens_mistral': 1503, 'n_tokens_neox': 1484, 'n_words': 331}