@@ -1346,33 +1346,45 @@ def ui_controls(mo_cli_arg_with_test_identifiers: bool):
13461346 label = "<small>Refresh</small>" ,
13471347 )
13481348
1349+ # read sections from query params to allow navigation via URL
1350+ # use #<cell_name> hash to scroll (e.g. #section_trace) — marimo scrolls to named cells
1351+ _open_sections = (cast (str , mo .query_params ().get ("sections" )) or "" ).split ("," )
1352+
13491353 # page switches
13501354 dlt_section_sync_switch : mo .ui .switch = mo .ui .switch (
13511355 value = True , label = "sync" if mo_cli_arg_with_test_identifiers else ""
13521356 )
13531357 dlt_section_info_switch : mo .ui .switch = mo .ui .switch (
1354- value = False , label = "overview" if mo_cli_arg_with_test_identifiers else ""
1358+ value = "overview" in _open_sections ,
1359+ label = "overview" if mo_cli_arg_with_test_identifiers else "" ,
13551360 )
13561361 dlt_section_schema_switch : mo .ui .switch = mo .ui .switch (
1357- value = False , label = "schema" if mo_cli_arg_with_test_identifiers else ""
1362+ value = "schema" in _open_sections ,
1363+ label = "schema" if mo_cli_arg_with_test_identifiers else "" ,
13581364 )
13591365 dlt_section_browse_data_switch : mo .ui .switch = mo .ui .switch (
1360- value = False , label = "data" if mo_cli_arg_with_test_identifiers else ""
1366+ value = "data" in _open_sections ,
1367+ label = "data" if mo_cli_arg_with_test_identifiers else "" ,
13611368 )
13621369 dlt_section_state_switch : mo .ui .switch = mo .ui .switch (
1363- value = False , label = "state" if mo_cli_arg_with_test_identifiers else ""
1370+ value = "state" in _open_sections ,
1371+ label = "state" if mo_cli_arg_with_test_identifiers else "" ,
13641372 )
13651373 dlt_section_trace_switch : mo .ui .switch = mo .ui .switch (
1366- value = False , label = "trace" if mo_cli_arg_with_test_identifiers else ""
1374+ value = "trace" in _open_sections ,
1375+ label = "trace" if mo_cli_arg_with_test_identifiers else "" ,
13671376 )
13681377 dlt_section_loads_switch : mo .ui .switch = mo .ui .switch (
1369- value = False , label = "loads" if mo_cli_arg_with_test_identifiers else ""
1378+ value = "loads" in _open_sections ,
1379+ label = "loads" if mo_cli_arg_with_test_identifiers else "" ,
13701380 )
13711381 dlt_section_ibis_browser_switch : mo .ui .switch = mo .ui .switch (
1372- value = False , label = "ibis" if mo_cli_arg_with_test_identifiers else ""
1382+ value = "ibis" in _open_sections ,
1383+ label = "ibis" if mo_cli_arg_with_test_identifiers else "" ,
13731384 )
13741385 dlt_section_data_quality_switch : mo .ui .switch = mo .ui .switch (
1375- value = False , label = "data_quality" if mo_cli_arg_with_test_identifiers else ""
1386+ value = "data_quality" in _open_sections ,
1387+ label = "data_quality" if mo_cli_arg_with_test_identifiers else "" ,
13761388 )
13771389
13781390 # other switches
0 commit comments