@@ -335,12 +335,14 @@ def render_hierarchical_html(self, trees: Dict[str, TreeNode]) -> str:
335335 icon = '▶' if is_collapsed else '▼'
336336 content_style = ' style="display: none;"' if is_collapsed else ''
337337
338+ file_word = "file" if tree .count == 1 else "files"
339+ sample_word = "sample" if tree .samples == 1 else "samples"
338340 section_html = f'''
339341<div class="type-section">
340342 <div class="type-header" onclick="toggleTypeSection(this)">
341343 <span class="type-icon">{ icon } </span>
342344 <span class="type-title">{ type_names [module_type ]} </span>
343- <span class="type-stats">({ tree .count } files , { tree .samples :,} samples )</span>
345+ <span class="type-stats">({ tree .count } { file_word } , { tree .samples :,} { sample_word } )</span>
344346 </div>
345347 <div class="type-content"{ content_style } >
346348'''
@@ -380,11 +382,14 @@ def _render_folder(self, node: TreeNode, name: str, level: int = 1) -> str:
380382 parts = []
381383
382384 # Render folder header (collapsed by default)
385+ file_word = "file" if node .count == 1 else "files"
386+ sample_word = "sample" if node .samples == 1 else "samples"
383387 parts .append (f'{ indent } <div class="folder-node collapsed" data-level="{ level } ">' )
384388 parts .append (f'{ indent } <div class="folder-header" onclick="toggleFolder(this)">' )
385389 parts .append (f'{ indent } <span class="folder-icon">▶</span>' )
386390 parts .append (f'{ indent } <span class="folder-name">📁 { html .escape (name )} </span>' )
387- parts .append (f'{ indent } <span class="folder-stats">({ node .count } files, { node .samples :,} samples)</span>' )
391+ parts .append (f'{ indent } <span class="folder-stats">'
392+ f'({ node .count } { file_word } , { node .samples :,} { sample_word } )</span>' )
388393 parts .append (f'{ indent } </div>' )
389394 parts .append (f'{ indent } <div class="folder-content" style="display: none;">' )
390395
0 commit comments