cjm-transcript-segment-align 0.0.3__tar.gz → 0.0.4__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 (29) hide show
  1. {cjm_transcript_segment_align-0.0.3/cjm_transcript_segment_align.egg-info → cjm_transcript_segment_align-0.0.4}/PKG-INFO +19 -15
  2. {cjm_transcript_segment_align-0.0.3 → cjm_transcript_segment_align-0.0.4}/README.md +18 -14
  3. cjm_transcript_segment_align-0.0.4/cjm_transcript_segment_align/__init__.py +1 -0
  4. {cjm_transcript_segment_align-0.0.3 → cjm_transcript_segment_align-0.0.4}/cjm_transcript_segment_align/components/handlers.py +32 -9
  5. {cjm_transcript_segment_align-0.0.3 → cjm_transcript_segment_align-0.0.4/cjm_transcript_segment_align.egg-info}/PKG-INFO +19 -15
  6. {cjm_transcript_segment_align-0.0.3 → cjm_transcript_segment_align-0.0.4}/settings.ini +1 -1
  7. cjm_transcript_segment_align-0.0.3/cjm_transcript_segment_align/__init__.py +0 -1
  8. {cjm_transcript_segment_align-0.0.3 → cjm_transcript_segment_align-0.0.4}/LICENSE +0 -0
  9. {cjm_transcript_segment_align-0.0.3 → cjm_transcript_segment_align-0.0.4}/MANIFEST.in +0 -0
  10. {cjm_transcript_segment_align-0.0.3 → cjm_transcript_segment_align-0.0.4}/cjm_transcript_segment_align/_modidx.py +0 -0
  11. {cjm_transcript_segment_align-0.0.3 → cjm_transcript_segment_align-0.0.4}/cjm_transcript_segment_align/components/__init__.py +0 -0
  12. {cjm_transcript_segment_align-0.0.3 → cjm_transcript_segment_align-0.0.4}/cjm_transcript_segment_align/components/helpers.py +0 -0
  13. {cjm_transcript_segment_align-0.0.3 → cjm_transcript_segment_align-0.0.4}/cjm_transcript_segment_align/components/keyboard_config.py +0 -0
  14. {cjm_transcript_segment_align-0.0.3 → cjm_transcript_segment_align-0.0.4}/cjm_transcript_segment_align/components/step_renderer.py +0 -0
  15. {cjm_transcript_segment_align-0.0.3 → cjm_transcript_segment_align-0.0.4}/cjm_transcript_segment_align/html_ids.py +0 -0
  16. {cjm_transcript_segment_align-0.0.3 → cjm_transcript_segment_align-0.0.4}/cjm_transcript_segment_align/routes/__init__.py +0 -0
  17. {cjm_transcript_segment_align-0.0.3 → cjm_transcript_segment_align-0.0.4}/cjm_transcript_segment_align/routes/chrome.py +0 -0
  18. {cjm_transcript_segment_align-0.0.3 → cjm_transcript_segment_align-0.0.4}/cjm_transcript_segment_align/routes/forced_alignment.py +0 -0
  19. {cjm_transcript_segment_align-0.0.3 → cjm_transcript_segment_align-0.0.4}/cjm_transcript_segment_align/services/__init__.py +0 -0
  20. {cjm_transcript_segment_align-0.0.3 → cjm_transcript_segment_align-0.0.4}/cjm_transcript_segment_align/services/forced_alignment.py +0 -0
  21. {cjm_transcript_segment_align-0.0.3 → cjm_transcript_segment_align-0.0.4}/cjm_transcript_segment_align.egg-info/SOURCES.txt +0 -0
  22. {cjm_transcript_segment_align-0.0.3 → cjm_transcript_segment_align-0.0.4}/cjm_transcript_segment_align.egg-info/dependency_links.txt +0 -0
  23. {cjm_transcript_segment_align-0.0.3 → cjm_transcript_segment_align-0.0.4}/cjm_transcript_segment_align.egg-info/entry_points.txt +0 -0
  24. {cjm_transcript_segment_align-0.0.3 → cjm_transcript_segment_align-0.0.4}/cjm_transcript_segment_align.egg-info/not-zip-safe +0 -0
  25. {cjm_transcript_segment_align-0.0.3 → cjm_transcript_segment_align-0.0.4}/cjm_transcript_segment_align.egg-info/requires.txt +0 -0
  26. {cjm_transcript_segment_align-0.0.3 → cjm_transcript_segment_align-0.0.4}/cjm_transcript_segment_align.egg-info/top_level.txt +0 -0
  27. {cjm_transcript_segment_align-0.0.3 → cjm_transcript_segment_align-0.0.4}/pyproject.toml +0 -0
  28. {cjm_transcript_segment_align-0.0.3 → cjm_transcript_segment_align-0.0.4}/setup.cfg +0 -0
  29. {cjm_transcript_segment_align-0.0.3 → cjm_transcript_segment_align-0.0.4}/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.3
3
+ Version: 0.0.4
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
@@ -74,21 +74,21 @@ graph LR
74
74
  routes_forced_alignment[routes.forced_alignment<br/>forced_alignment]
75
75
  services_forced_alignment[services.forced_alignment<br/>forced_alignment]
76
76
 
77
- components_handlers --> routes_forced_alignment
78
- components_handlers --> components_keyboard_config
79
- components_handlers --> html_ids
80
77
  components_handlers --> components_step_renderer
78
+ components_handlers --> html_ids
79
+ components_handlers --> components_keyboard_config
80
+ components_handlers --> routes_forced_alignment
81
81
  components_keyboard_config --> html_ids
82
- components_step_renderer --> components_helpers
83
- components_step_renderer --> components_keyboard_config
84
82
  components_step_renderer --> html_ids
83
+ components_step_renderer --> components_keyboard_config
84
+ components_step_renderer --> components_helpers
85
85
  routes_chrome --> components_handlers
86
86
  routes_chrome --> html_ids
87
- routes_chrome --> components_step_renderer
88
87
  routes_chrome --> components_keyboard_config
89
- routes_forced_alignment --> services_forced_alignment
90
- routes_forced_alignment --> html_ids
88
+ routes_chrome --> components_step_renderer
91
89
  routes_forced_alignment --> components_step_renderer
90
+ routes_forced_alignment --> html_ids
91
+ routes_forced_alignment --> services_forced_alignment
92
92
  ```
93
93
 
94
94
  *15 cross-module dependencies detected*
@@ -482,9 +482,11 @@ def create_seg_init_chrome_wrapper(
482
482
  def create_align_init_chrome_wrapper() -> Callable: # Wrapped handler that adds alignment status
483
483
  """Create a wrapper for align init that adds mini-stats and alignment status.
484
484
 
485
- Alignment init is simpler than seg init - it doesn't need to build the
486
- full KB system (seg init handles that). It just updates alignment-specific
487
- chrome and the alignment status badge.
485
+ Returns a footer OOB (not a standalone alignment status badge) to avoid
486
+ a race condition: both seg and align init auto-trigger on load, and the
487
+ alignment status badge only exists inside the footer after seg init's
488
+ footer OOB is processed. Using a footer OOB is safe because the footer
489
+ container always exists in the DOM.
488
490
  """
489
491
  async def wrapped_align_init(
490
492
  state_store:WorkflowStateStore,
@@ -500,9 +502,11 @@ def create_align_init_chrome_wrapper() -> Callable: # Wrapped handler that adds
500
502
  """
501
503
  Create a wrapper for align init that adds mini-stats and alignment status.
502
504
 
503
- Alignment init is simpler than seg init - it doesn't need to build the
504
- full KB system (seg init handles that). It just updates alignment-specific
505
- chrome and the alignment status badge.
505
+ Returns a footer OOB (not a standalone alignment status badge) to avoid
506
+ a race condition: both seg and align init auto-trigger on load, and the
507
+ alignment status badge only exists inside the footer after seg init's
508
+ footer OOB is processed. Using a footer OOB is safe because the footer
509
+ container always exists in the DOM.
506
510
  """
507
511
  ```
508
512
 
@@ -39,21 +39,21 @@ graph LR
39
39
  routes_forced_alignment[routes.forced_alignment<br/>forced_alignment]
40
40
  services_forced_alignment[services.forced_alignment<br/>forced_alignment]
41
41
 
42
- components_handlers --> routes_forced_alignment
43
- components_handlers --> components_keyboard_config
44
- components_handlers --> html_ids
45
42
  components_handlers --> components_step_renderer
43
+ components_handlers --> html_ids
44
+ components_handlers --> components_keyboard_config
45
+ components_handlers --> routes_forced_alignment
46
46
  components_keyboard_config --> html_ids
47
- components_step_renderer --> components_helpers
48
- components_step_renderer --> components_keyboard_config
49
47
  components_step_renderer --> html_ids
48
+ components_step_renderer --> components_keyboard_config
49
+ components_step_renderer --> components_helpers
50
50
  routes_chrome --> components_handlers
51
51
  routes_chrome --> html_ids
52
- routes_chrome --> components_step_renderer
53
52
  routes_chrome --> components_keyboard_config
54
- routes_forced_alignment --> services_forced_alignment
55
- routes_forced_alignment --> html_ids
53
+ routes_chrome --> components_step_renderer
56
54
  routes_forced_alignment --> components_step_renderer
55
+ routes_forced_alignment --> html_ids
56
+ routes_forced_alignment --> services_forced_alignment
57
57
  ```
58
58
 
59
59
  *15 cross-module dependencies detected*
@@ -447,9 +447,11 @@ def create_seg_init_chrome_wrapper(
447
447
  def create_align_init_chrome_wrapper() -> Callable: # Wrapped handler that adds alignment status
448
448
  """Create a wrapper for align init that adds mini-stats and alignment status.
449
449
 
450
- Alignment init is simpler than seg init - it doesn't need to build the
451
- full KB system (seg init handles that). It just updates alignment-specific
452
- chrome and the alignment status badge.
450
+ Returns a footer OOB (not a standalone alignment status badge) to avoid
451
+ a race condition: both seg and align init auto-trigger on load, and the
452
+ alignment status badge only exists inside the footer after seg init's
453
+ footer OOB is processed. Using a footer OOB is safe because the footer
454
+ container always exists in the DOM.
453
455
  """
454
456
  async def wrapped_align_init(
455
457
  state_store:WorkflowStateStore,
@@ -465,9 +467,11 @@ def create_align_init_chrome_wrapper() -> Callable: # Wrapped handler that adds
465
467
  """
466
468
  Create a wrapper for align init that adds mini-stats and alignment status.
467
469
 
468
- Alignment init is simpler than seg init - it doesn't need to build the
469
- full KB system (seg init handles that). It just updates alignment-specific
470
- chrome and the alignment status badge.
470
+ Returns a footer OOB (not a standalone alignment status badge) to avoid
471
+ a race condition: both seg and align init auto-trigger on load, and the
472
+ alignment status badge only exists inside the footer after seg init's
473
+ footer OOB is processed. Using a footer OOB is safe because the footer
474
+ container always exists in the DOM.
471
475
  """
472
476
  ```
473
477
 
@@ -0,0 +1 @@
1
+ __version__ = "0.0.4"
@@ -361,9 +361,11 @@ def create_seg_init_chrome_wrapper(
361
361
  def create_align_init_chrome_wrapper() -> Callable: # Wrapped handler that adds alignment status
362
362
  """Create a wrapper for align init that adds mini-stats and alignment status.
363
363
 
364
- Alignment init is simpler than seg init - it doesn't need to build the
365
- full KB system (seg init handles that). It just updates alignment-specific
366
- chrome and the alignment status badge.
364
+ Returns a footer OOB (not a standalone alignment status badge) to avoid
365
+ a race condition: both seg and align init auto-trigger on load, and the
366
+ alignment status badge only exists inside the footer after seg init's
367
+ footer OOB is processed. Using a footer OOB is safe because the footer
368
+ container always exists in the DOM.
367
369
  """
368
370
  async def wrapped_align_init(
369
371
  state_store:WorkflowStateStore,
@@ -376,7 +378,11 @@ def create_align_init_chrome_wrapper() -> Callable: # Wrapped handler that adds
376
378
  visible_count:int=5,
377
379
  card_width:int=40,
378
380
  ):
379
- """Wrapped align init that adds mini-stats and alignment status."""
381
+ """Wrapped align init that adds mini-stats and alignment status in footer."""
382
+ from cjm_transcript_segmentation.components.step_renderer import render_seg_footer_content
383
+ from cjm_fasthtml_tailwind.utilities.typography import font_size as fs
384
+ from cjm_fasthtml_daisyui.utilities.semantic_colors import text_dui as td
385
+
380
386
  # Call pure domain handler
381
387
  result: AlignInitResult = await _handle_align_init(
382
388
  state_store, workflow_id, source_service, alignment_service,
@@ -385,18 +391,35 @@ def create_align_init_chrome_wrapper() -> Callable: # Wrapped handler that adds
385
391
 
386
392
  session_id = get_session_id(sess)
387
393
 
388
- # Get segment count for alignment status
394
+ # Get segment state for footer rendering and alignment status
389
395
  workflow_state = state_store.get_state(workflow_id, session_id)
390
- segment_count = len(workflow_state.get("step_states", {}).get("segmentation", {}).get("segments", []))
396
+ seg_state = workflow_state.get("step_states", {}).get("segmentation", {})
397
+ segment_count = len(seg_state.get("segments", []))
391
398
  chunk_count = len(result.chunks)
392
399
 
393
400
  # Mini-stats badge OOB
394
401
  mini_stats_oob = render_align_mini_stats_badge(result.chunks, oob=True)
395
402
 
396
- # Alignment status OOB
397
- alignment_status_oob = render_alignment_status(segment_count, chunk_count, oob=True)
403
+ # Footer OOB with alignment status (targets sd-shared-footer which always exists,
404
+ # unlike sd-alignment-status which is inside the footer and may not exist yet)
405
+ segments = [TextSegment.from_dict(s) for s in seg_state.get("segments", [])]
406
+ focused_index = seg_state.get("focused_index", 0)
407
+
408
+ if segments:
409
+ column_footer = render_seg_footer_content(segments, focused_index)
410
+ else:
411
+ column_footer = Span(
412
+ "Footer with progress and timestamp details will appear here.",
413
+ cls=combine_classes(fs.sm, td.base_content.opacity(50))
414
+ )
415
+
416
+ footer_oob = Div(
417
+ render_footer_inner_content(column_footer, segment_count, chunk_count),
418
+ id=CombinedHtmlIds.SHARED_FOOTER,
419
+ hx_swap_oob="innerHTML"
420
+ )
398
421
 
399
- return (result.column_body, mini_stats_oob, alignment_status_oob)
422
+ return (result.column_body, mini_stats_oob, footer_oob)
400
423
 
401
424
  return wrapped_align_init
402
425
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: cjm-transcript-segment-align
3
- Version: 0.0.3
3
+ Version: 0.0.4
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
@@ -74,21 +74,21 @@ graph LR
74
74
  routes_forced_alignment[routes.forced_alignment<br/>forced_alignment]
75
75
  services_forced_alignment[services.forced_alignment<br/>forced_alignment]
76
76
 
77
- components_handlers --> routes_forced_alignment
78
- components_handlers --> components_keyboard_config
79
- components_handlers --> html_ids
80
77
  components_handlers --> components_step_renderer
78
+ components_handlers --> html_ids
79
+ components_handlers --> components_keyboard_config
80
+ components_handlers --> routes_forced_alignment
81
81
  components_keyboard_config --> html_ids
82
- components_step_renderer --> components_helpers
83
- components_step_renderer --> components_keyboard_config
84
82
  components_step_renderer --> html_ids
83
+ components_step_renderer --> components_keyboard_config
84
+ components_step_renderer --> components_helpers
85
85
  routes_chrome --> components_handlers
86
86
  routes_chrome --> html_ids
87
- routes_chrome --> components_step_renderer
88
87
  routes_chrome --> components_keyboard_config
89
- routes_forced_alignment --> services_forced_alignment
90
- routes_forced_alignment --> html_ids
88
+ routes_chrome --> components_step_renderer
91
89
  routes_forced_alignment --> components_step_renderer
90
+ routes_forced_alignment --> html_ids
91
+ routes_forced_alignment --> services_forced_alignment
92
92
  ```
93
93
 
94
94
  *15 cross-module dependencies detected*
@@ -482,9 +482,11 @@ def create_seg_init_chrome_wrapper(
482
482
  def create_align_init_chrome_wrapper() -> Callable: # Wrapped handler that adds alignment status
483
483
  """Create a wrapper for align init that adds mini-stats and alignment status.
484
484
 
485
- Alignment init is simpler than seg init - it doesn't need to build the
486
- full KB system (seg init handles that). It just updates alignment-specific
487
- chrome and the alignment status badge.
485
+ Returns a footer OOB (not a standalone alignment status badge) to avoid
486
+ a race condition: both seg and align init auto-trigger on load, and the
487
+ alignment status badge only exists inside the footer after seg init's
488
+ footer OOB is processed. Using a footer OOB is safe because the footer
489
+ container always exists in the DOM.
488
490
  """
489
491
  async def wrapped_align_init(
490
492
  state_store:WorkflowStateStore,
@@ -500,9 +502,11 @@ def create_align_init_chrome_wrapper() -> Callable: # Wrapped handler that adds
500
502
  """
501
503
  Create a wrapper for align init that adds mini-stats and alignment status.
502
504
 
503
- Alignment init is simpler than seg init - it doesn't need to build the
504
- full KB system (seg init handles that). It just updates alignment-specific
505
- chrome and the alignment status badge.
505
+ Returns a footer OOB (not a standalone alignment status badge) to avoid
506
+ a race condition: both seg and align init auto-trigger on load, and the
507
+ alignment status badge only exists inside the footer after seg init's
508
+ footer OOB is processed. Using a footer OOB is safe because the footer
509
+ container always exists in the DOM.
506
510
  """
507
511
  ```
508
512
 
@@ -1,7 +1,7 @@
1
1
  [DEFAULT]
2
2
  repo = cjm-transcript-segment-align
3
3
  lib_name = cjm-transcript-segment-align
4
- version = 0.0.3
4
+ version = 0.0.4
5
5
  min_python = 3.12
6
6
  license = apache2
7
7
  black_formatting = False
@@ -1 +0,0 @@
1
- __version__ = "0.0.3"