Skip to content

feat(ls): add visual divider between folders and items in workspace listing#19

Draft
Copilot wants to merge 246 commits intomainfrom
copilot/add-divider-to-ls-output
Draft

feat(ls): add visual divider between folders and items in workspace listing#19
Copilot wants to merge 246 commits intomainfrom
copilot/add-divider-to-ls-output

Conversation

Copy link

Copilot AI commented Dec 29, 2025

✨ Description of new changes

When listing workspace contents with folder_listing_enabled=true and output_format=text, folders and items were displayed in a flat mixed list with no visual separation, reducing readability.

This change adds a visual divider (------------------------------) between folders and items to improve readability when listing workspace contents.

  • Summary: Adds a visual divider between folders and items in fab ls workspace listing output. The divider only appears when folder_listing_enabled=true, output_format=text, and --long flag is NOT provided. The divider is inserted as a data entry in the sorted results, requiring no changes to rendering logic or core output classes.

  • Context: The original issue requested better visual distinction between folders and items in workspace listings, similar to the behavior when using -a flag for virtual workspace items. This improves readability and helps users quickly identify folders vs. items in large workspaces.

  • Dependencies: None - uses existing infrastructure and utilities.

Implementation Details

Divider as a data entry:

  • Private constant _DIVIDER = "------------------------------" defined in fab_fs_ls_item.py
  • Private method _sort_ws_elements_with_seperation_by_type_order() groups elements by type (Folder, Item), sorts each group using existing sort_ws_elements(), and inserts divider between non-empty groups
  • Type order (Folder, Item) is hardcoded within the private method as it is specific to ls on items
  • Divider only applied when all conditions are met:
    • folder_listing_enabled=true (config setting)
    • output_format="text" (not JSON)
    • --long flag NOT provided

Code organization:

  • All divider-related logic is encapsulated as private methods in fab_fs_ls_item.py
  • Keeps the functionality specific to ls on items, improving separation of concerns
  • Reuses existing sort_ws_elements() from fab_cmd_fs_utils.py for consistency
  • No changes to fab_ui.py, fab_output.py, or fab_cmd_ls_utils.py

Behavior Examples

When folder_listing_enabled=true, output_format=text, and WITHOUT --long flag:

Folder1.Folder
Folder2.Folder
------------------------------
Notebook1.Notebook
Lakehouse1.Lakehouse

When using --long flag or JSON output:

  • No divider shown (original behavior preserved)

Testing

  • New test test_ls_workspace_with_folders_and_items_divider() added to verify divider functionality (marked as skip, requires VCR cassette recording in live environment)
  • All existing tests pass
  • Manual verification confirms correct behavior in all scenarios
  • Backward compatibility maintained
Original prompt

This section details on the original issue you should resolve

<issue_title>[FEATURE] better display ls workspace items with folders (add divider)</issue_title>
<issue_description>### Use Case / Problem

when listing items within a workspace, e.g., 'fab ls ws1.workspace', and the config folder_listing_enabled equals true and the config output_format is text, the ouptut is flat with mixed folders and items.

Proposed Solution

ideally it will be better do have some distinction in the results, like we do when pass -a that divide the output of virtual workspace items. only relevant in text output format.

Alternatives Considered

No response

Impact Assessment

  • This would help me personally
  • This would help my team/organization
  • This would help the broader fabric-cli community
  • This aligns with Microsoft Fabric roadmap items

Implementation Attestation

  • I understand this feature should maintain backward compatibility with existing commands
  • I confirm this feature request does not introduce performance regressions for existing workflows
  • I acknowledge that new features must follow fabric-cli's established patterns and conventions

Implementation Notes

No response</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

ayeshurun and others added 30 commits September 17, 2025 17:11
chore: Introduce release workflowc
Alon Yeshurun and others added 29 commits February 19, 2026 15:47
- Add 'Needs Author Feedback' assessment category to all 3 prompts
- Rename 'Missing Details' to 'Needs Author Feedback' in bug-triage
- Add new category to question-triage and feature-triage
- Remove redundant response text fallback and needsHumanReview override
- Update workflow label detection to match new category name

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Merge Needs Maintainer Input and Needs Team Review into single
  Needs Team Review category in question-triage prompt
- Remove duplicate needs author feedback label from post-processing
  (action's ai:* label is sufficient)
- Remove ai:* label cleanup (keep action's assessment labels)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Extract CLI commands, flags, item types, auth methods, and error
codes from actual source files. Inject into system prompt (not issue
body) so AI backs up answers with real codebase data. Comments and
issue body stay clean.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
All AI triage comments now end with a footer instructing users
to tag @microsoft/fabric-cli-dev if the issue needs team attention
but wasn't escalated by the AI.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Approach A (Action): github/ai-assessment-comment-labeler with codebase context injection
- Approach B (Code Agent): Custom scripts/ai_triage.py that greps source code and injects into prompt
- Both trigger on 'needs triage' label and post tagged comments (🅰️/🅱️)
- Both include collapsible label decision tables in comments
- Labels suppressed on both for fair testing
- Added CLI doc page URLs to all 3 prompt files

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- A: Use yaml.safe_load/dump to avoid YAML alias errors from markdown **bold**
- A: Remove bold markdown from injected context text
- B: Reduce code context limits (30K total, 4K/file, 8 files max)
- B: Add API error details to stderr for debugging

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Bug: Potential Bug and Needs Team Review → Escalated to team
- Question: Tied each category explicitly to its footer
- Feature: Tied each category explicitly to its footer
- Removed stale Codebase Reference instruction from feature prompt

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Remove numbered dimension checklists from all 3 prompts
- Instruct model to skip adequate aspects, highlight only missing/wrong/notable
- Reduce target length from 3-5 to 2-4 paragraphs
- Trim verbose preamble in ai_triage.py code context header

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Valuable Enhancement → 📋 Backlog candidate (no escalation)
- Help Wanted → 🤝 Community contribution welcome
- Out of Scope → ✅ No action needed
- Add 'needs discussion' to needsHumanReview in both workflows

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add tailored PEP/RFC/convention references to each prompt:
- Bug: packaging, CLI conventions, HTTP/REST, auth, file I/O, runtime
- Question: packaging, CLI conventions, HTTP/REST, auth, data formats
- Feature: CLI conventions, packaging, HTTP/REST, backward compat, auth

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…mpts

- Remove Approach B (agent workflow + ai_triage.py), archived on branch
- Move codebase reference from pipeline build step into prompt files
- Prompts now self-contained: commands, flags, item types, auth, hidden entities
- Remove /tmp/prompts indirection, use .github/prompts directly
- Clean up A/B testing artifacts (tagged comments, approach labels)
- Restore phase control flags (SUPPRESS_LABELS + SUPPRESS_COMMENTS)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…inks

Reference https://microsoft.github.io/fabric-cli/essentials/resource_types/
instead of static lists, keeping prompts always up to date.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…s_item

Wraps sorted_elements_dict[0].keys() with list() to satisfy
the list[str] type expected by format_and_print_output().

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] better display ls workspace items with folders (add divider)

2 participants