Keep Files breadcrumbs aligned to the current folder

Pin the horizontally scrolling breadcrumb to its trailing edge so deep paths keep the current folder visible. Preserve tappable navigation, middle-ellipsize long labels, and cover the behavior with focused widget tests and the rendered fixture.
This commit is contained in:
2026-11-12 23:08:03 +00:00
parent d19a14b9f9
commit d56a76c9a7
4 changed files with 227 additions and 17 deletions
+12 -2
View File
@@ -1,10 +1,14 @@
import 'package:pipelines_app/core/api_gateway.dart';
import 'package:pipelines_app/features/chat/files/files_urls.dart';
/// A static, two-level explorer fixture. Its files live in capture/fixtures/files.
/// A static explorer fixture with a deep starting path and a long folder name.
/// Its files live in capture/fixtures/files.
JsonMap probeFilesReply(JsonMap request) {
final fields = request['list_directory'] as Map?;
final path = '${fields?['path'] ?? '/srv/probe/release'}';
final requestedPath = '${fields?['path'] ?? '/srv/probe/release'}';
final path = requestedPath == '/srv/probe/release'
? '/srv/probe/release/operations/2026/quarterly/release-candidate'
: requestedPath;
final nested = path.endsWith('/assets');
final entries = nested
? <(String, int)>[('design.png', 18432), ('icon.jpg', 23000)]
@@ -31,6 +35,12 @@ JsonMap probeFilesReply(JsonMap request) {
'entries': [
if (!nested) ...[
{'name': 'assets', 'path': '$path/assets', 'is_dir': true},
{
'name': 'a-folder-name-that-is-long-enough-to-ellipsize-in-the-middle',
'path':
'$path/a-folder-name-that-is-long-enough-to-ellipsize-in-the-middle',
'is_dir': true,
},
{
'name': '.config',
'path': '$path/.config',