cjm-transcript-segment-align 0.0.4__tar.gz → 0.0.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. {cjm_transcript_segment_align-0.0.4/cjm_transcript_segment_align.egg-info → cjm_transcript_segment_align-0.0.6}/PKG-INFO +161 -74
  2. {cjm_transcript_segment_align-0.0.4 → cjm_transcript_segment_align-0.0.6}/README.md +159 -73
  3. cjm_transcript_segment_align-0.0.6/cjm_transcript_segment_align/__init__.py +1 -0
  4. {cjm_transcript_segment_align-0.0.4 → cjm_transcript_segment_align-0.0.6}/cjm_transcript_segment_align/_modidx.py +14 -10
  5. {cjm_transcript_segment_align-0.0.4 → cjm_transcript_segment_align-0.0.6}/cjm_transcript_segment_align/components/handlers.py +164 -29
  6. {cjm_transcript_segment_align-0.0.4 → cjm_transcript_segment_align-0.0.6}/cjm_transcript_segment_align/components/keyboard_config.py +7 -39
  7. {cjm_transcript_segment_align-0.0.4 → cjm_transcript_segment_align-0.0.6}/cjm_transcript_segment_align/components/step_renderer.py +50 -32
  8. {cjm_transcript_segment_align-0.0.4 → cjm_transcript_segment_align-0.0.6}/cjm_transcript_segment_align/html_ids.py +4 -1
  9. cjm_transcript_segment_align-0.0.6/cjm_transcript_segment_align/models.py +32 -0
  10. {cjm_transcript_segment_align-0.0.4 → cjm_transcript_segment_align-0.0.6}/cjm_transcript_segment_align/routes/chrome.py +6 -19
  11. cjm_transcript_segment_align-0.0.6/cjm_transcript_segment_align/routes/forced_alignment.py +193 -0
  12. cjm_transcript_segment_align-0.0.6/cjm_transcript_segment_align/routes/init.py +333 -0
  13. {cjm_transcript_segment_align-0.0.4 → cjm_transcript_segment_align-0.0.6/cjm_transcript_segment_align.egg-info}/PKG-INFO +161 -74
  14. {cjm_transcript_segment_align-0.0.4 → cjm_transcript_segment_align-0.0.6}/cjm_transcript_segment_align.egg-info/SOURCES.txt +2 -0
  15. {cjm_transcript_segment_align-0.0.4 → cjm_transcript_segment_align-0.0.6}/cjm_transcript_segment_align.egg-info/requires.txt +1 -0
  16. {cjm_transcript_segment_align-0.0.4 → cjm_transcript_segment_align-0.0.6}/settings.ini +2 -2
  17. cjm_transcript_segment_align-0.0.4/cjm_transcript_segment_align/__init__.py +0 -1
  18. cjm_transcript_segment_align-0.0.4/cjm_transcript_segment_align/routes/forced_alignment.py +0 -366
  19. {cjm_transcript_segment_align-0.0.4 → cjm_transcript_segment_align-0.0.6}/LICENSE +0 -0
  20. {cjm_transcript_segment_align-0.0.4 → cjm_transcript_segment_align-0.0.6}/MANIFEST.in +0 -0
  21. {cjm_transcript_segment_align-0.0.4 → cjm_transcript_segment_align-0.0.6}/cjm_transcript_segment_align/components/__init__.py +0 -0
  22. {cjm_transcript_segment_align-0.0.4 → cjm_transcript_segment_align-0.0.6}/cjm_transcript_segment_align/components/helpers.py +0 -0
  23. {cjm_transcript_segment_align-0.0.4 → cjm_transcript_segment_align-0.0.6}/cjm_transcript_segment_align/routes/__init__.py +0 -0
  24. {cjm_transcript_segment_align-0.0.4 → cjm_transcript_segment_align-0.0.6}/cjm_transcript_segment_align/services/__init__.py +0 -0
  25. {cjm_transcript_segment_align-0.0.4 → cjm_transcript_segment_align-0.0.6}/cjm_transcript_segment_align/services/forced_alignment.py +0 -0
  26. {cjm_transcript_segment_align-0.0.4 → cjm_transcript_segment_align-0.0.6}/cjm_transcript_segment_align.egg-info/dependency_links.txt +0 -0
  27. {cjm_transcript_segment_align-0.0.4 → cjm_transcript_segment_align-0.0.6}/cjm_transcript_segment_align.egg-info/entry_points.txt +0 -0
  28. {cjm_transcript_segment_align-0.0.4 → cjm_transcript_segment_align-0.0.6}/cjm_transcript_segment_align.egg-info/not-zip-safe +0 -0
  29. {cjm_transcript_segment_align-0.0.4 → cjm_transcript_segment_align-0.0.6}/cjm_transcript_segment_align.egg-info/top_level.txt +0 -0
  30. {cjm_transcript_segment_align-0.0.4 → cjm_transcript_segment_align-0.0.6}/pyproject.toml +0 -0
  31. {cjm_transcript_segment_align-0.0.4 → cjm_transcript_segment_align-0.0.6}/setup.cfg +0 -0
  32. {cjm_transcript_segment_align-0.0.4 → cjm_transcript_segment_align-0.0.6}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: cjm-transcript-segment-align
3
- Version: 0.0.4
3
+ Version: 0.0.6
4
4
  Summary: FastHTML dual-column text segmentation & VAD alignment UI for transcript decomposition workflows with forced alignment-based text splitting for aligning text segments with VAD chunks.
5
5
  Home-page: https://github.com/cj-mills/cjm-transcript-segment-align
6
6
  Author: Christian J. Mills
@@ -19,6 +19,7 @@ Requires-Dist: cjm-plugin-system
19
19
  Requires-Dist: cjm_transcription_plugin_system
20
20
  Requires-Dist: cjm_transcript_segmentation
21
21
  Requires-Dist: cjm_transcript_vad_align
22
+ Requires-Dist: cjm_fasthtml_job_monitor
22
23
  Provides-Extra: dev
23
24
  Dynamic: author
24
25
  Dynamic: author-email
@@ -52,14 +53,16 @@ pip install cjm_transcript_segment_align
52
53
  │ ├── helpers.ipynb # State extraction helpers for cross-domain coordination in Phase 2 combined step
53
54
  │ ├── keyboard_config.ipynb # Shared keyboard navigation configuration for the combined Phase 2 step
54
55
  │ └── step_renderer.ipynb # Phase 2 combined step renderer: dual-column layout for Segment & Align
55
- ├── routes/ (2)
56
+ ├── routes/ (3)
56
57
  │ ├── chrome.ipynb # Shared chrome switching route handlers for the combined Phase 2 step
57
- └── forced_alignment.ipynb # Routes for triggering forced alignment, polling progress, and toggling between NLTK and force-aligned pre-splits
58
+ ├── forced_alignment.ipynb # Routes for toggling between NLTK and force-aligned pre-splits, plus rendering helpers for FA UI controls. Trigger and progress are handled by `cjm-fasthtml-job-monitor`.
59
+ │ └── init.ipynb # Consolidated router assembly for the segment-align step
58
60
  ├── services/ (1)
59
61
  │ └── forced_alignment.ipynb # Forced alignment service for audio-informed text pre-splitting via forced alignment plugin
60
- └── html_ids.ipynb # HTML ID constants for Phase 2 Shell: Dual-Column Layout shared chrome
62
+ ├── html_ids.ipynb # HTML ID constants for Phase 2 Shell: Dual-Column Layout shared chrome
63
+ └── models.ipynb # Data types and result containers for the segment-align integration surface
61
64
 
62
- Total: 8 notebooks across 3 directories
65
+ Total: 10 notebooks across 3 directories
63
66
 
64
67
  ## Module Dependencies
65
68
 
@@ -70,28 +73,37 @@ graph LR
70
73
  components_keyboard_config[components.keyboard_config<br/>keyboard_config]
71
74
  components_step_renderer[components.step_renderer<br/>step_combined]
72
75
  html_ids[html_ids<br/>html_ids]
76
+ models[models<br/>models]
73
77
  routes_chrome[routes.chrome<br/>chrome]
74
78
  routes_forced_alignment[routes.forced_alignment<br/>forced_alignment]
79
+ routes_init[routes.init<br/>routes/init]
75
80
  services_forced_alignment[services.forced_alignment<br/>forced_alignment]
76
81
 
77
- components_handlers --> components_step_renderer
78
- components_handlers --> html_ids
79
82
  components_handlers --> components_keyboard_config
83
+ components_handlers --> services_forced_alignment
84
+ components_handlers --> html_ids
85
+ components_handlers --> components_step_renderer
80
86
  components_handlers --> routes_forced_alignment
81
87
  components_keyboard_config --> html_ids
82
- components_step_renderer --> html_ids
83
88
  components_step_renderer --> components_keyboard_config
84
89
  components_step_renderer --> components_helpers
85
- routes_chrome --> components_handlers
90
+ components_step_renderer --> html_ids
86
91
  routes_chrome --> html_ids
87
- routes_chrome --> components_keyboard_config
88
92
  routes_chrome --> components_step_renderer
89
- routes_forced_alignment --> components_step_renderer
93
+ routes_chrome --> components_handlers
90
94
  routes_forced_alignment --> html_ids
91
- routes_forced_alignment --> services_forced_alignment
95
+ routes_forced_alignment --> components_step_renderer
96
+ routes_init --> components_handlers
97
+ routes_init --> models
98
+ routes_init --> html_ids
99
+ routes_init --> routes_forced_alignment
100
+ routes_init --> services_forced_alignment
101
+ routes_init --> components_keyboard_config
102
+ routes_init --> routes_chrome
103
+ routes_init --> components_step_renderer
92
104
  ```
93
105
 
94
- *15 cross-module dependencies detected*
106
+ *22 cross-module dependencies detected*
95
107
 
96
108
  ## CLI Reference
97
109
 
@@ -124,7 +136,7 @@ async def _handle_switch_chrome(
124
136
  sess, # FastHTML session object
125
137
  seg_urls:SegmentationUrls, # URL bundle for segmentation routes
126
138
  align_urls:AlignmentUrls, # URL bundle for alignment routes
127
- fa_trigger_url:str="", # URL for FA trigger route
139
+ jm_trigger=None, # Pre-rendered job monitor trigger element
128
140
  fa_toggle_url:str="", # URL for FA toggle route
129
141
  fa_available:bool=False, # Whether FA plugin is available
130
142
  ) -> tuple: # OOB swaps for shared chrome containers
@@ -138,7 +150,7 @@ def init_chrome_router(
138
150
  seg_urls: SegmentationUrls, # URL bundle for segmentation routes
139
151
  align_urls: AlignmentUrls, # URL bundle for alignment routes
140
152
  prefix: str, # Route prefix (e.g., "/workflow/core/chrome")
141
- fa_trigger_url: str = "", # URL for FA trigger route
153
+ jm_trigger = None, # Pre-rendered job monitor trigger element
142
154
  fa_toggle_url: str = "", # URL for FA toggle route
143
155
  fa_available: bool = False, # Whether FA plugin is available
144
156
  ) -> Tuple[APIRouter, Dict[str, Callable]]: # (router, route_dict)
@@ -153,16 +165,15 @@ DEBUG_SWITCH_CHROME = False
153
165
 
154
166
  ### forced_alignment (`forced_alignment.ipynb`)
155
167
 
156
- > Routes for triggering forced alignment, polling progress, and toggling
157
- > between NLTK and force-aligned pre-splits
168
+ > Routes for toggling between NLTK and force-aligned pre-splits, plus
169
+ > rendering helpers for FA UI controls. Trigger and progress are handled
170
+ > by `cjm-fasthtml-job-monitor`.
158
171
 
159
172
  #### Import
160
173
 
161
174
  ``` python
162
175
  from cjm_transcript_segment_align.routes.forced_alignment import (
163
176
  FA_SLOT_ID,
164
- render_fa_trigger_button,
165
- render_fa_progress,
166
177
  render_fa_toggle,
167
178
  init_forced_alignment_routers
168
179
  )
@@ -170,23 +181,6 @@ from cjm_transcript_segment_align.routes.forced_alignment import (
170
181
 
171
182
  #### Functions
172
183
 
173
- ``` python
174
- def render_fa_trigger_button(
175
- trigger_url: str, # URL for forced alignment trigger route
176
- disabled: bool = False, # Whether button is disabled
177
- ) -> Any: # Force Align trigger button
178
- "Render the Force Align trigger button."
179
- ```
180
-
181
- ``` python
182
- def render_fa_progress(
183
- progress_val: float, # Progress value 0.0-1.0
184
- message: str, # Progress stage message
185
- progress_url: str, # URL for progress polling
186
- ) -> Any: # Progress indicator with polling
187
- "Render forced alignment progress indicator with HTMX polling."
188
- ```
189
-
190
184
  ``` python
191
185
  def render_fa_toggle(
192
186
  active_presplit: str, # "nltk" or "forced_alignment"
@@ -195,20 +189,6 @@ def render_fa_toggle(
195
189
  "Render the NLTK / Force Aligned toggle button group."
196
190
  ```
197
191
 
198
- ``` python
199
- async def _handle_fa_trigger(
200
- state_store: SQLiteWorkflowStateStore,
201
- workflow_id: str,
202
- fa_service: ForcedAlignmentService,
203
- source_service: SourceService,
204
- request: Any,
205
- sess: Any,
206
- seg_urls: SegmentationUrls,
207
- toggle_url: str,
208
- ) -> Any: # Targeted OOB updates (slots + stats + toolbar with toggle + alignment status + mini-stats)
209
- "Trigger forced alignment and replace working segments with FA splits."
210
- ```
211
-
212
192
  ``` python
213
193
  async def _handle_fa_toggle(
214
194
  state_store: SQLiteWorkflowStateStore,
@@ -230,12 +210,15 @@ async def _handle_fa_toggle(
230
210
  def init_forced_alignment_routers(
231
211
  state_store: SQLiteWorkflowStateStore, # State store instance
232
212
  workflow_id: str, # Workflow identifier
233
- fa_service: ForcedAlignmentService, # Forced alignment service
234
- source_service: SourceService, # Source service for audio paths/text
235
213
  seg_urls: SegmentationUrls, # Segmentation URL bundle
236
214
  prefix: str, # Route prefix (e.g., "/fa")
237
215
  ) -> Tuple[APIRouter, Dict[str, Callable]]: # (router, route_dict)
238
- "Initialize forced alignment routes."
216
+ """
217
+ Initialize forced alignment routes (toggle only).
218
+
219
+ Trigger and progress are handled by `cjm-fasthtml-job-monitor`.
220
+ This router provides the domain-specific toggle between NLTK/FA pre-splits.
221
+ """
239
222
  ```
240
223
 
241
224
  #### Variables
@@ -391,6 +374,8 @@ _PUNCT_RE
391
374
  from cjm_transcript_segment_align.components.handlers import (
392
375
  segments_match_presplit,
393
376
  build_fa_extra_actions,
377
+ build_fa_job_args,
378
+ build_fa_on_complete,
394
379
  create_seg_mutation_wrapper,
395
380
  wrap_align_mutation_handler,
396
381
  create_seg_init_chrome_wrapper,
@@ -419,7 +404,7 @@ def segments_match_presplit(
419
404
  ``` python
420
405
  def build_fa_extra_actions(
421
406
  seg_state: dict, # Segmentation step state dict
422
- fa_trigger_url: str = "", # URL for FA trigger route
407
+ jm_trigger: Any = None, # Pre-rendered job monitor trigger element (or None)
423
408
  fa_toggle_url: str = "", # URL for FA toggle route
424
409
  fa_available: bool = False, # Whether FA plugin is available
425
410
  ) -> Any: # FA controls wrapped in slot div (or None)
@@ -427,14 +412,46 @@ def build_fa_extra_actions(
427
412
  Build FA controls for the toolbar extra_actions slot.
428
413
 
429
414
  Shows toggle when current segments match either pre-split snapshot.
430
- Shows trigger button when FA pre-split doesn't exist or current doesn't match either.
415
+ Shows job monitor trigger when FA pre-split doesn't exist or current doesn't match either.
416
+ `jm_trigger` is the pre-rendered trigger element from `check_inflight_job` or `render_job_trigger`.
417
+ """
418
+ ```
419
+
420
+ ``` python
421
+ def build_fa_job_args(
422
+ source_service: SourceService, # Source service for audio paths/text
423
+ ) -> Callable: # fn(state_store, workflow_id, session_id) -> List[(args, kwargs)]
424
+ """
425
+ Create the job_args_builder for FA job sequences.
426
+
427
+ Returns a function that extracts audio paths and text from workflow state,
428
+ producing one (args, kwargs) pair per selected source.
429
+ """
430
+ ```
431
+
432
+ ``` python
433
+ def build_fa_on_complete(
434
+ source_service: SourceService, # Source service for source block metadata
435
+ seg_urls: SegmentationUrls, # Segmentation URL bundle
436
+ fa_toggle_url: str, # URL for FA toggle route
437
+ fa_available: bool, # Whether FA plugin is available
438
+ state_store: WorkflowStateStore, # State store
439
+ workflow_id: str, # Workflow ID
440
+ step_id: str = "segmentation", # Step ID for segmentation state
441
+ ) -> Callable: # async fn(results, request, sess) -> List[FT]
442
+ """
443
+ Create the on_complete callback for FA job sequences.
444
+
445
+ Converts per-source FA plugin results into TextSegments using VAD chunk
446
+ alignment, updates segmentation state (fa_presplit, segments, etc.),
447
+ and returns OOB card stack + toggle + alignment status updates.
431
448
  """
432
449
  ```
433
450
 
434
451
  ``` python
435
452
  def create_seg_mutation_wrapper(
436
453
  handler_result: Callable, # _handle_seg_*_result function
437
- fa_trigger_url: str = "", # URL for FA trigger route
454
+ jm_trigger: Any = None, # Pre-rendered job monitor trigger element
438
455
  fa_toggle_url: str = "", # URL for FA toggle route
439
456
  fa_available: bool = False, # Whether FA plugin is available
440
457
  clear_fa_presplit: bool = False, # Whether to clear fa_presplit after handler (for NLTK Split)
@@ -466,7 +483,7 @@ def wrap_align_mutation_handler(
466
483
  def create_seg_init_chrome_wrapper(
467
484
  align_urls:AlignmentUrls, # URL bundle for alignment routes (for KB system)
468
485
  switch_chrome_url:str, # URL for chrome switching (for KB system)
469
- fa_trigger_url:str="", # URL for forced alignment trigger (optional)
486
+ jm_trigger:Any=None, # Pre-rendered job monitor trigger element (optional)
470
487
  fa_toggle_url:str="", # URL for forced alignment toggle (optional)
471
488
  fa_available:bool=False, # Whether forced alignment plugin is available
472
489
  ) -> Callable: # Wrapped handler that builds KB system and shared chrome
@@ -512,15 +529,15 @@ def create_align_init_chrome_wrapper() -> Callable: # Wrapped handler that adds
512
529
 
513
530
  ``` python
514
531
  def create_seg_mutation_wrappers(
515
- fa_trigger_url: str = "", # URL for FA trigger route
532
+ jm_trigger: Any = None, # Pre-rendered job monitor trigger element
516
533
  fa_toggle_url: str = "", # URL for FA toggle route
517
534
  fa_available: bool = False, # Whether FA plugin is available
518
535
  ) -> dict: # Dict with keys: split, merge, undo, reset, ai_split
519
536
  """
520
537
  Create wrapped mutation handlers with FA controls in toolbar.
521
538
 
522
- Returns a dict of handler name wrapped handler function.
523
- Called at setup time when FA URLs are known.
539
+ Returns a dict of handler name -> wrapped handler function.
540
+ Called at setup time when job monitor trigger element and FA URLs are known.
524
541
  The ai_split wrapper has clear_fa_presplit=True — clicking NLTK Split
525
542
  discards the FA pre-split snapshot and replaces the toggle with the trigger button.
526
543
  """
@@ -618,6 +635,38 @@ class CombinedHtmlIds:
618
635
  "Convert an ID to a CSS selector format."
619
636
  ```
620
637
 
638
+ ### routes/init (`init.ipynb`)
639
+
640
+ > Consolidated router assembly for the segment-align step
641
+
642
+ #### Import
643
+
644
+ ``` python
645
+ from cjm_transcript_segment_align.routes.init import (
646
+ init_segment_align_routers
647
+ )
648
+ ```
649
+
650
+ #### Functions
651
+
652
+ ``` python
653
+ def _validate_alignment(
654
+ state:Dict[str, Any] # Workflow state dictionary
655
+ ) -> bool: # True if segments and VAD chunks are 1:1 aligned
656
+ "Validate 1:1 alignment between segments and VAD chunks."
657
+ ```
658
+
659
+ ``` python
660
+ def init_segment_align_routers(
661
+ """
662
+ Initialize all segment-align routers and return result bundle.
663
+
664
+ Internally creates services, initializes sub-library routers,
665
+ wires mutation wrappers, chrome switching, forced alignment,
666
+ and job monitor integration.
667
+ """
668
+ ```
669
+
621
670
  ### keyboard_config (`keyboard_config.ipynb`)
622
671
 
623
672
  > Shared keyboard navigation configuration for the combined Phase 2 step
@@ -628,8 +677,8 @@ class CombinedHtmlIds:
628
677
  from cjm_transcript_segment_align.components.keyboard_config import (
629
678
  DEBUG_KB_SYSTEM,
630
679
  ZONE_CHANGE_CALLBACK,
680
+ KB_SYSTEM_ID,
631
681
  SWITCH_CHROME_BTN_ID,
632
- render_keyboard_hints_collapsible,
633
682
  build_combined_kb_system,
634
683
  generate_zone_change_js
635
684
  )
@@ -637,15 +686,6 @@ from cjm_transcript_segment_align.components.keyboard_config import (
637
686
 
638
687
  #### Functions
639
688
 
640
- ``` python
641
- def render_keyboard_hints_collapsible(
642
- manager:ZoneManager, # Keyboard zone manager with actions configured
643
- container_id:str="sd-keyboard-hints", # HTML ID for the hints container
644
- include_zone_switch:bool=False, # Whether to include zone switch hints
645
- ) -> Any: # Collapsible keyboard hints component
646
- "Render keyboard shortcut hints in a collapsible DaisyUI collapse."
647
- ```
648
-
649
689
  ``` python
650
690
  def build_combined_kb_system(
651
691
  seg_urls:SegmentationUrls, # URL bundle for segmentation routes
@@ -666,9 +706,49 @@ def generate_zone_change_js(
666
706
  ``` python
667
707
  DEBUG_KB_SYSTEM = True
668
708
  ZONE_CHANGE_CALLBACK = 'onCombinedZoneChange'
709
+ KB_SYSTEM_ID = 'sd-seg-align-kb'
669
710
  SWITCH_CHROME_BTN_ID = 'sd-switch-chrome-btn'
670
711
  ```
671
712
 
713
+ ### models (`models.ipynb`)
714
+
715
+ > Data types and result containers for the segment-align integration
716
+ > surface
717
+
718
+ #### Import
719
+
720
+ ``` python
721
+ from cjm_transcript_segment_align.models import (
722
+ SegmentAlignUrls,
723
+ SegmentAlignResult
724
+ )
725
+ ```
726
+
727
+ #### Classes
728
+
729
+ ``` python
730
+ @dataclass
731
+ class SegmentAlignUrls:
732
+ "Combined URL bundle for host access."
733
+
734
+ seg: SegmentationUrls # Segmentation route URLs
735
+ align: AlignmentUrls # Alignment route URLs
736
+ switch_chrome: str = '' # Chrome switching URL
737
+ fa_toggle: str = '' # FA toggle URL (empty if FA unavailable)
738
+ ```
739
+
740
+ ``` python
741
+ @dataclass
742
+ class SegmentAlignResult:
743
+ "Everything the host needs from init_segment_align_routers()."
744
+
745
+ urls: SegmentAlignUrls # Combined URL bundle
746
+ render_step: Callable # fn(ctx: InteractionContext) -> FT
747
+ sse_headers: list = field(...) # Headers for app (SSE extension)
748
+ fa_available: bool = False # Whether forced alignment is available
749
+ validate_alignment: Callable # fn(state: dict) -> bool
750
+ ```
751
+
672
752
  ### step_combined (`step_renderer.ipynb`)
673
753
 
674
754
  > Phase 2 combined step renderer: dual-column layout for Segment & Align
@@ -759,10 +839,9 @@ def _render_shared_chrome(
759
839
  seg_state:dict=None, # Extracted segmentation state (None = show placeholders)
760
840
  align_state:dict=None, # Extracted alignment state (None = no VAD data yet)
761
841
  urls:SegmentationUrls=None, # Segmentation URL bundle (required when seg_state provided)
762
- kb_manager:Any=None, # Keyboard manager (required when seg_state provided)
763
842
  fa_extra_actions:Any=None, # FA controls for toolbar extra_actions slot
764
843
  nltk_split_disabled:bool=False, # Whether NLTK Split button is disabled
765
- ) -> tuple: # (hints, toolbar, controls, footer)
844
+ ) -> tuple: # (toolbar, controls, footer)
766
845
  """
767
846
  Render shared chrome containers, populated with segmentation content when initialized.
768
847
 
@@ -806,10 +885,18 @@ def render_combined_step(
806
885
  align_urls:AlignmentUrls=None, # URL bundle for alignment routes
807
886
  switch_chrome_url:str="", # URL for chrome switching route
808
887
  fa_available:bool=False, # Whether forced alignment plugin is available
809
- fa_trigger_url:str="", # URL for forced alignment trigger route
888
+ jm_trigger:Any=None, # Pre-rendered job monitor trigger element (or None)
810
889
  fa_toggle_url:str="", # URL for forced alignment toggle route
890
+ jm_overlay_el:Any=None, # Job monitor overlay element (or placeholder)
891
+ jm_modal_el:Any=None, # Job monitor modal element (or placeholder)
892
+ jm_kb_script_el:Any=None, # Job monitor keyboard script placeholder (for OOB pause/resume)
811
893
  ) -> Any: # FastHTML component with full dual-column layout
812
- "Render Phase 2: Combined Segment & Align step with dual-column layout."
894
+ """
895
+ Render Phase 2: Combined Segment & Align step with dual-column layout.
896
+
897
+ The dual-column container has position:relative for the job monitor overlay,
898
+ and a stable ID (CombinedHtmlIds.COLUMNS) for overlay targeting.
899
+ """
813
900
  ```
814
901
 
815
902
  #### Variables