Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
36520e2
Change pull_request to pull_request_target
ayeshurun Sep 17, 2025
444d351
Merge pull request #4 from ayeshurun/fix-semantic-pr
ayeshurun Sep 17, 2025
8b34e28
Merge branch 'microsoft:main' into main
ayeshurun Sep 18, 2025
0c47fda
Merge branch 'microsoft:main' into main
ayeshurun Sep 18, 2025
ccd7b91
Merge branch 'microsoft:main' into main
ayeshurun Sep 21, 2025
43cc353
Merge branch 'microsoft:main' into main
ayeshurun Sep 21, 2025
ea76426
Merge branch 'microsoft:main' into main
ayeshurun Sep 28, 2025
c702b91
Merge branch 'microsoft:main' into main
ayeshurun Sep 29, 2025
5e847ef
Merge branch 'microsoft:main' into main
ayeshurun Oct 16, 2025
69c733e
Merge branch 'microsoft:main' into main
ayeshurun Oct 20, 2025
5d5f1ad
Merge branch 'microsoft:main' into main
ayeshurun Oct 20, 2025
0c5de9c
Merge branch 'microsoft:main' into main
ayeshurun Oct 21, 2025
025f456
Merge branch 'microsoft:main' into main
ayeshurun Oct 22, 2025
df0c5a4
Merge branch 'microsoft:main' into main
ayeshurun Oct 23, 2025
c6892ed
Merge branch 'microsoft:main' into main
ayeshurun Oct 26, 2025
f30ce9b
Merge branch 'microsoft:main' into main
ayeshurun Nov 4, 2025
cf7e06b
Merge branch 'microsoft:main' into main
ayeshurun Nov 11, 2025
3a727dd
Merge branch 'main' of https://github.com/ayeshurun/fabric-cli
Nov 13, 2025
d3cfbb4
Merge branch 'main' of https://github.com/ayeshurun/fabric-cli
Nov 17, 2025
bb051b1
Merge branch 'main' of https://github.com/ayeshurun/fabric-cli
Nov 26, 2025
f46f685
Merge branch 'microsoft:main' into main
ayeshurun Dec 9, 2025
19e3a75
Merge branch 'main' of https://github.com/ayeshurun/fabric-cli
Dec 14, 2025
55020f0
Fix new functionality section in release notes
Dec 14, 2025
0c08fb5
Merge branch 'microsoft:main' into main
ayeshurun Dec 15, 2025
beb0149
Fix new functionality section in release notes
Dec 14, 2025
c0e3672
Merge branch 'main' of https://github.com/ayeshurun/fabric-cli
Dec 17, 2025
ca313c3
Introduce release workflow
Dec 17, 2025
8aa05e7
Merge pull request #14 from ayeshurun/release-workflow
ayeshurun Dec 17, 2025
39f2d85
Add GH_TOKEN to create release step
ayeshurun Dec 17, 2025
5e3b68e
Initial plan
Copilot Dec 17, 2025
7c573b0
Enhance create-release workflow with GITHUB_STEP_SUMMARY and optional…
Copilot Dec 17, 2025
f9a4bb2
Refactor GITHUB_STEP_SUMMARY messages to use heredoc syntax
Copilot Dec 18, 2025
f04c7b7
Merge pull request #16 from ayeshurun/copilot/enhance-create-release-…
ayeshurun Dec 18, 2025
641c4e7
Update release notes for v1.3.1
ayeshurun Dec 22, 2025
516dbb8
Fix new functionality section in release notes
Dec 14, 2025
484993f
Introduce release workflow
Dec 17, 2025
3a42a5c
Add GH_TOKEN to create release step
ayeshurun Dec 17, 2025
0755733
Initial plan
Copilot Dec 17, 2025
5917da7
Enhance create-release workflow with GITHUB_STEP_SUMMARY and optional…
Copilot Dec 17, 2025
635eadc
Refactor GITHUB_STEP_SUMMARY messages to use heredoc syntax
Copilot Dec 18, 2025
22cc9cb
Update release notes for v1.3.1
ayeshurun Dec 22, 2025
44f44b3
Merge branch 'main' of https://github.com/ayeshurun/fabric-cli
Dec 24, 2025
ec97f25
Initial plan
Copilot Dec 29, 2025
1ffb863
Add divider between folders and items in ls workspace output
Copilot Dec 29, 2025
74f9410
Refactor: Move divider logic from _print_output_format_result_text to…
Copilot Dec 29, 2025
95306b8
Remove fab_output.py changes, pass folders/items data directly throug…
Copilot Dec 29, 2025
d1df1f3
Refactor: Insert divider entry directly into data array
Copilot Dec 29, 2025
673ee80
Refactor divider logic and add test coverage
Copilot Dec 30, 2025
71b11fa
Revert default format_type="text" logic
Copilot Dec 30, 2025
66eaf93
Rename function and add type_order parameter
Copilot Dec 30, 2025
7eac2c5
Move DIVIDER to module-level constant
Copilot Dec 30, 2025
5d647dc
Add output format and long flag checks for divider logic
Copilot Jan 1, 2026
5c455ce
Merge branch 'microsoft:main' into main
ayeshurun Jan 1, 2026
1adf434
Record test
ayeshurun Jan 6, 2026
5897cde
Fix new functionality section in release notes
Dec 14, 2025
845fcb5
Introduce release workflow
Dec 17, 2025
5278b73
Add GH_TOKEN to create release step
ayeshurun Dec 17, 2025
3c75e88
Initial plan
Copilot Dec 17, 2025
326c429
Enhance create-release workflow with GITHUB_STEP_SUMMARY and optional…
Copilot Dec 17, 2025
aca8824
Refactor GITHUB_STEP_SUMMARY messages to use heredoc syntax
Copilot Dec 18, 2025
c2ac8ba
Update release notes for v1.3.1
ayeshurun Dec 22, 2025
2dc9582
Fix new functionality section in release notes
Dec 14, 2025
7b9fc69
Initial plan
Copilot Dec 17, 2025
31fe14a
Update release notes for v1.3.1
ayeshurun Dec 22, 2025
f567fad
Merge branch 'main' of https://github.com/ayeshurun/fabric-cli
Jan 12, 2026
93a8170
Merge branch 'main' of https://github.com/microsoft/fabric-cli
Jan 15, 2026
d60e42c
Merge branch 'microsoft:main' into main
ayeshurun Jan 15, 2026
49e143b
Move divider logic to fab_fs_ls_item as private method
Copilot Jan 18, 2026
ea026ef
Revert fab_cmd_ls_utils.py changes and hardcode type_order
Copilot Jan 18, 2026
89285fb
Merge branch 'microsoft:main' into main
ayeshurun Jan 19, 2026
e80c8bb
Merge branch 'main' of https://github.com/microsoft/fabric-cli
Jan 21, 2026
b5580f2
merge
Jan 29, 2026
5f4e7fe
merge
Jan 29, 2026
73166a5
Fix new functionality section in release notes
Dec 14, 2025
269107f
Introduce release workflow
Dec 17, 2025
43b04df
Add GH_TOKEN to create release step
ayeshurun Dec 17, 2025
4eaca2c
Initial plan
Copilot Dec 17, 2025
4ff4f18
Enhance create-release workflow with GITHUB_STEP_SUMMARY and optional…
Copilot Dec 17, 2025
692e5d6
Update release notes for v1.3.1
ayeshurun Dec 22, 2025
63e61f1
Fix new functionality section in release notes
Dec 14, 2025
9dc7758
Initial plan
Copilot Dec 17, 2025
e2d5a0d
Update release notes for v1.3.1
ayeshurun Dec 22, 2025
0c9cfa2
Fix new functionality section in release notes
Dec 14, 2025
c06933c
Introduce release workflow
Dec 17, 2025
980b4da
Add GH_TOKEN to create release step
ayeshurun Dec 17, 2025
a73b480
Initial plan
Copilot Dec 17, 2025
d1d5dc2
Enhance create-release workflow with GITHUB_STEP_SUMMARY and optional…
Copilot Dec 17, 2025
4005a96
Refactor GITHUB_STEP_SUMMARY messages to use heredoc syntax
Copilot Dec 18, 2025
31c17c1
Update release notes for v1.3.1
ayeshurun Dec 22, 2025
aa82800
Fix new functionality section in release notes
Dec 14, 2025
8a026ed
Introduce release workflow
Dec 17, 2025
a4a7de2
Add GH_TOKEN to create release step
ayeshurun Dec 17, 2025
28403cc
Initial plan
Copilot Dec 17, 2025
2a42459
Enhance create-release workflow with GITHUB_STEP_SUMMARY and optional…
Copilot Dec 17, 2025
ed802ec
Refactor GITHUB_STEP_SUMMARY messages to use heredoc syntax
Copilot Dec 18, 2025
75b7bf4
Update release notes for v1.3.1
ayeshurun Dec 22, 2025
419ef59
Merge branch 'main' of https://github.com/ayeshurun/fabric-cli
Jan 29, 2026
60991e9
merge with main
Feb 3, 2026
1bd6b5c
Update name
Feb 3, 2026
bc9c6e7
Merge branch 'main' of https://github.com/microsoft/fabric-cli
Feb 3, 2026
3afe8aa
Merge branch 'main' of https://github.com/ayeshurun/fabric-cli into c…
Feb 3, 2026
53007dc
add changelog entry
Feb 3, 2026
8ede310
update changelog
Feb 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changes/unreleased/optimization-20260203-163440.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: optimization
body: Add visual divider between folders and items in `ls` command on workspaces with text output format
time: 2026-02-03T16:34:40.477661885Z
custom:
Author: ayeshurun
AuthorLink: https://github.com/ayeshurun
16 changes: 8 additions & 8 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ on:
workflow_dispatch:
inputs:
version:
description: "The version to release (e.g., v1.2.0)"
description: 'The version to release (e.g., v1.2.0)'
required: true
commit_sha:
description: "Optional: Commit SHA to create the tag on. If not provided, the tag will be created on the latest commit of the current branch (HEAD)"
description: 'Optional: Commit SHA to create the tag on. If not provided, the tag will be created on the latest commit of the current branch (HEAD)'
required: false
default: ""
default: ''

jobs:
create-release:
Expand All @@ -20,7 +20,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Required to access full commit history for validation
fetch-depth: 0 # Required to access full commit history for validation

- name: Display workflow information
run: |
Expand Down Expand Up @@ -65,22 +65,22 @@ jobs:
run: |
VERSION="${{ github.event.inputs.version }}"
COMMIT_SHA="${{ github.event.inputs.commit_sha }}"

# Use provided commit SHA or default to HEAD
if [ -n "$COMMIT_SHA" ]; then
TARGET_COMMIT="$COMMIT_SHA"
else
TARGET_COMMIT="HEAD"
fi

echo "tag_name=$VERSION" >> $GITHUB_OUTPUT
echo "changelog_file_path=.changes/${VERSION}.md" >> $GITHUB_OUTPUT
echo "target_commit=$TARGET_COMMIT" >> $GITHUB_OUTPUT

# Get the actual commit SHA for display
ACTUAL_SHA=$(git rev-parse "$TARGET_COMMIT")
echo "actual_sha=$ACTUAL_SHA" >> $GITHUB_OUTPUT

echo "✅ Release variables set:"
echo " - Tag name: $VERSION"
echo " - Target commit: $ACTUAL_SHA"
Expand Down
58 changes: 57 additions & 1 deletion src/fabric_cli/commands/fs/ls/fab_fs_ls_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,68 @@
from fabric_cli.utils import fab_cmd_fs_utils as utils_fs
from fabric_cli.utils import fab_cmd_ls_utils as utils_ls

# Divider used to separate folders and items in workspace listings
_DIVIDER = "------------------------------"


def _sort_ws_elements_with_seperation(
ws_elements: list[Union[Item, Folder]], show_details: bool
) -> list[dict]:
"""
Groups elements by type (Folders first, then Items), sorts each group using sort_ws_elements,
and inserts a divider between non-empty groups.

Args:
ws_elements: List of workspace elements (Items and Folders)
show_details: Whether to include detailed columns

Returns:
list: Single list with folders first, divider, then items
"""
if not ws_elements:
return []

result = []
first_group = True
type_order = [Folder, Item]

for typ in type_order:
group = [el for el in ws_elements if isinstance(el, typ)]
if group:
group_dicts = utils_fs.sort_ws_elements(group, show_details)
if not first_group:
divider = {"name": _DIVIDER}
if show_details:
divider["id"] = ""
result.append(divider)
result.extend(group_dicts)
first_group = False

return result


def exec(workspace: Workspace, args):
show_details = bool(args.long)
show_all = bool(args.all)
ws_elements: list[Union[Item, Folder]] = utils_fs.get_ws_elements(workspace)
sorted_elements_dict = utils_fs.sort_ws_elements(ws_elements, show_details)

# Check if folder listing is enabled
folder_listing_enabled = (
fab_state_config.get_config(fab_constant.FAB_FOLDER_LISTING_ENABLED) == "true"
)

# Get output format from args or config
output_format = getattr(args, "output_format", None) or fab_state_config.get_config(
fab_constant.FAB_OUTPUT_FORMAT
)

# Use separation if folder listing is enabled, output is text format, and --long is not provided
if folder_listing_enabled and output_format == "text" and not show_details:
sorted_elements_dict = _sort_ws_elements_with_seperation(
ws_elements, show_details
)
else:
sorted_elements_dict = utils_fs.sort_ws_elements(ws_elements, show_details)

show_hidden = (
show_all or fab_state_config.get_config(fab_constant.FAB_SHOW_HIDDEN) == "true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.1.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
- ms-fabric-cli/1.3.1 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
method: GET
uri: https://api.fabric.microsoft.com/v1/workspaces
response:
Expand All @@ -26,15 +26,15 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '1517'
- '2096'
Content-Type:
- application/json; charset=utf-8
Date:
- Sun, 16 Nov 2025 13:28:59 GMT
- Tue, 06 Jan 2026 13:09:57 GMT
Pragma:
- no-cache
RequestId:
- a1ca655d-adf4-4a7a-8d2c-2dc3ab03e53b
- 0ec0d210-30ae-4090-85e2-325c932f8c3a
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
Expand All @@ -60,7 +60,7 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.1.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
- ms-fabric-cli/1.3.1 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
method: GET
uri: https://api.fabric.microsoft.com/v1/workspaces
response:
Expand All @@ -75,15 +75,15 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '1517'
- '2096'
Content-Type:
- application/json; charset=utf-8
Date:
- Sun, 16 Nov 2025 13:29:00 GMT
- Tue, 06 Jan 2026 13:09:57 GMT
Pragma:
- no-cache
RequestId:
- 4fb405d9-466a-4e9d-81f3-a61091331c8a
- b8741740-c7ed-4a13-9a48-3e7e9433efa2
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
Expand All @@ -109,13 +109,13 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.1.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
- ms-fabric-cli/1.3.1 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
method: GET
uri: https://api.fabric.microsoft.com/v1/capacities
response:
body:
string: '{"value": [{"id": "00000000-0000-0000-0000-000000000004", "displayName":
"mocked_fabriccli_capacity_name", "sku": "F2", "region": "Central US", "state":
"mocked_fabriccli_capacity_name", "sku": "F32", "region": "Central US", "state":
"Active"}]}'
headers:
Access-Control-Expose-Headers:
Expand All @@ -125,15 +125,15 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '271'
- '425'
Content-Type:
- application/json; charset=utf-8
Date:
- Sun, 16 Nov 2025 13:29:05 GMT
- Tue, 06 Jan 2026 13:10:01 GMT
Pragma:
- no-cache
RequestId:
- 9a962d92-07ed-4680-97dc-c07909f25e22
- 47895aad-73fd-49c2-b5f1-6242b5c9b3d8
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
Expand Down Expand Up @@ -162,12 +162,12 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.1.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
- ms-fabric-cli/1.3.1 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
method: POST
uri: https://api.fabric.microsoft.com/v1/workspaces
response:
body:
string: '{"id": "7b82ecee-ed54-4d87-84dd-07511c5f5ad2", "displayName": "fabriccli_WorkspacePerTestclass_000001",
string: '{"id": "b86e9b69-16a9-4078-aff8-922ba052431e", "displayName": "fabriccli_WorkspacePerTestclass_000001",
"description": "Created by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}'
headers:
Access-Control-Expose-Headers:
Expand All @@ -177,17 +177,17 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '189'
- '188'
Content-Type:
- application/json; charset=utf-8
Date:
- Sun, 16 Nov 2025 13:29:14 GMT
- Tue, 06 Jan 2026 13:10:08 GMT
Location:
- https://api.fabric.microsoft.com/v1/workspaces/7b82ecee-ed54-4d87-84dd-07511c5f5ad2
- https://api.fabric.microsoft.com/v1/workspaces/b86e9b69-16a9-4078-aff8-922ba052431e
Pragma:
- no-cache
RequestId:
- a9920ffb-8339-43a8-8f5b-ab313cafb507
- 4611b486-ee97-401f-bc7f-d686e34ee3b1
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
Expand All @@ -213,13 +213,13 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.1.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
- ms-fabric-cli/1.3.1 (ls; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
method: GET
uri: https://api.fabric.microsoft.com/v1/workspaces
response:
body:
string: '{"value": [{"id": "3634a139-2c9e-4205-910b-3b089a31be47", "displayName":
"My workspace", "description": "", "type": "Personal"}, {"id": "7b82ecee-ed54-4d87-84dd-07511c5f5ad2",
"My workspace", "description": "", "type": "Personal"}, {"id": "b86e9b69-16a9-4078-aff8-922ba052431e",
"displayName": "fabriccli_WorkspacePerTestclass_000001", "description": "Created
by fab", "type": "Workspace", "capacityId": "00000000-0000-0000-0000-000000000004"}]}'
headers:
Expand All @@ -230,15 +230,15 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '1551'
- '2130'
Content-Type:
- application/json; charset=utf-8
Date:
- Sun, 16 Nov 2025 13:29:43 GMT
- Tue, 06 Jan 2026 13:10:51 GMT
Pragma:
- no-cache
RequestId:
- 760e6315-8597-44fc-807f-62840e999e08
- 8a1402e0-38c2-4bb2-89d0-eb8582dbd688
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
Expand All @@ -264,14 +264,12 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.1.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
- ms-fabric-cli/1.3.1 (ls; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
method: GET
uri: https://api.fabric.microsoft.com/v1/workspaces/7b82ecee-ed54-4d87-84dd-07511c5f5ad2/items
uri: https://api.fabric.microsoft.com/v1/workspaces/b86e9b69-16a9-4078-aff8-922ba052431e/items
response:
body:
string: '{"value": [{"id": "2d69f214-7721-41c3-a595-1ac4960a7215", "type": "Notebook",
"displayName": "fabcli000001", "description": "Created by fab", "workspaceId":
"7b82ecee-ed54-4d87-84dd-07511c5f5ad2"}]}'
string: '{"value": []}'
headers:
Access-Control-Expose-Headers:
- RequestId
Expand All @@ -280,15 +278,15 @@ interactions:
Content-Encoding:
- gzip
Content-Length:
- '176'
- '32'
Content-Type:
- application/json; charset=utf-8
Date:
- Sun, 16 Nov 2025 13:29:44 GMT
- Tue, 06 Jan 2026 13:10:51 GMT
Pragma:
- no-cache
RequestId:
- 8f711d74-2ab1-4d92-9c00-f90f31843fe1
- 60a90680-1baf-41a3-b15e-9be0bad4932d
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
Expand Down Expand Up @@ -316,9 +314,9 @@ interactions:
Content-Type:
- application/json
User-Agent:
- ms-fabric-cli/1.1.0 (None; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
- ms-fabric-cli/1.3.1 (ls; Linux; x86_64; 6.6.87.2-microsoft-standard-WSL2)
method: DELETE
uri: https://api.fabric.microsoft.com/v1/workspaces/7b82ecee-ed54-4d87-84dd-07511c5f5ad2
uri: https://api.fabric.microsoft.com/v1/workspaces/b86e9b69-16a9-4078-aff8-922ba052431e
response:
body:
string: ''
Expand All @@ -334,11 +332,11 @@ interactions:
Content-Type:
- application/octet-stream
Date:
- Sun, 16 Nov 2025 13:29:45 GMT
- Tue, 06 Jan 2026 13:10:51 GMT
Pragma:
- no-cache
RequestId:
- 87dce47d-17c3-48d7-8046-89b2600e75b1
- 4a7ae808-9baa-4b36-9657-a1ea8f286ae3
Strict-Transport-Security:
- max-age=31536000; includeSubDomains
X-Content-Type-Options:
Expand Down
Loading
Loading