Skip to content

Commit 491d4cc

Browse files
authored
Improve the recover command (#69)
* Add recover command to dash UI * Add JSON mode for recover command * Add dry-run for slurm regenerate * Add cancel button * Reorganize docs
1 parent 6553c96 commit 491d4cc

File tree

20 files changed

+1431
-422
lines changed

20 files changed

+1431
-422
lines changed

docs/book.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ git-repository-url = "https://github.com/NREL/torc"
1717
edit-url-template = "https://github.com/NREL/torc/edit/main/docs/{path}"
1818
site-url = "/torc/"
1919
cname = ""
20-
additional-js = ["mermaid.min.js", "mermaid-init.js"]
20+
additional-css = ["custom.css"]
21+
additional-js = ["mermaid.min.js", "mermaid-init.js", "sidebar-toggle.js"]
2122

2223
[output.html.print]
2324
enable = true

docs/custom.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/* Hide section numbers on the deepest level (actual content pages like 3.1.1, 3.1.2) */
2+
/* Target: chapter > section (group headers) > section (content pages) */
3+
ol.section ol.section > li.chapter-item strong {
4+
display: none;
5+
}

docs/sidebar-toggle.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// Custom sidebar toggle behavior for mdbook
2+
// When clicking a section title that you're already viewing, toggle collapse instead of reloading
3+
(() => {
4+
document.addEventListener('DOMContentLoaded', () => {
5+
const sidebar = document.getElementById('sidebar');
6+
if (!sidebar) return;
7+
8+
sidebar.addEventListener('click', (e) => {
9+
// Find the clicked anchor element
10+
const link = e.target.closest('a[href]');
11+
if (!link) return;
12+
13+
// Skip if this is a toggle button (those already work correctly)
14+
if (link.classList.contains('toggle')) return;
15+
16+
// Check if this link's parent has a sibling toggle button (meaning it's a collapsible section)
17+
const toggleButton = link.parentElement?.querySelector('a.toggle');
18+
if (!toggleButton) return;
19+
20+
// Get the current page URL without hash/query
21+
const currentPage = document.location.href.toString().split('#')[0].split('?')[0];
22+
23+
// Get the link's target URL
24+
const linkHref = new URL(link.href, document.location.href).href.split('#')[0].split('?')[0];
25+
26+
// If we're already on this page, toggle the section instead of navigating
27+
if (currentPage === linkHref) {
28+
e.preventDefault();
29+
e.stopPropagation();
30+
// Toggle the expanded class on the parent li
31+
const parentLi = link.parentElement;
32+
if (parentLi && parentLi.classList.contains('chapter-item')) {
33+
parentLi.classList.toggle('expanded');
34+
}
35+
}
36+
});
37+
});
38+
})();

docs/src/SUMMARY.md

Lines changed: 60 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,23 @@
1111
- [Quick Start (HPC)](./quick-start-hpc.md)
1212
- [Quick Start (Remote Workers)](./quick-start-remote.md)
1313

14-
# Understanding Torc
15-
1614
- [Explanation](./explanation/README.md)
17-
- [Architecture Overview](./explanation/architecture.md)
18-
- [Client](./explanation/client.md)
19-
- [Job Runners](./explanation/job-runners.md)
20-
- [Job State Transitions](./explanation/job-states.md)
21-
- [Environment Variables](./explanation/environment-variables.md)
22-
- [Workflow Reinitialization](./explanation/reinitialization.md)
23-
- [Workflow Archiving](./explanation/archiving.md)
24-
- [Dependency Resolution](./explanation/dependencies.md)
25-
- [Parallelization Strategies](./explanation/parallelization.md)
26-
- [Workflow Actions](./explanation/workflow-actions.md)
27-
- [Slurm Workflows](./explanation/slurm-workflows.md)
28-
- [Automatic Failure Recovery](./explanation/automatic-recovery.md)
15+
- [Core Concepts]()
16+
- [Architecture Overview](./explanation/architecture.md)
17+
- [Job State Transitions](./explanation/job-states.md)
18+
- [Dependency Resolution](./explanation/dependencies.md)
19+
- [Execution]()
20+
- [Client](./explanation/client.md)
21+
- [Job Runners](./explanation/job-runners.md)
22+
- [Parallelization Strategies](./explanation/parallelization.md)
23+
- [Workflow Lifecycle]()
24+
- [Workflow Actions](./explanation/workflow-actions.md)
25+
- [Workflow Reinitialization](./explanation/reinitialization.md)
26+
- [Workflow Archiving](./explanation/archiving.md)
27+
- [Automatic Failure Recovery](./explanation/automatic-recovery.md)
28+
- [Environments]()
29+
- [Slurm Workflows](./explanation/slurm-workflows.md)
30+
- [Environment Variables](./explanation/environment-variables.md)
2931
- [Design](./explanation/design/README.md)
3032
- [Server API Handler](./explanation/design/server.md)
3133
- [Central Database](./explanation/design/database.md)
@@ -34,27 +36,29 @@
3436
- [Workflow Graph](./explanation/design/workflow-graph.md)
3537
- [Interface Architecture](./explanation/design/interfaces.md)
3638

37-
# How-To Guides
38-
39-
- [How-To](./how-to/README.md)
40-
- [Configuration Files](./how-to/configuration-files.md)
41-
- [Creating Workflows](./how-to/creating-workflows.md)
42-
- [Remote Workers](./how-to/remote-workers.md)
43-
- [Working with Slurm](./how-to/slurm.md)
44-
- [HPC Profiles](./how-to/hpc-profiles.md)
45-
- [Job Checkpointing](./how-to/checkpointing.md)
46-
- [Resource Monitoring](./how-to/resource-monitoring.md)
47-
- [Terminal UI (TUI)](./how-to/tui.md)
48-
- [Web Dashboard](./how-to/dashboard.md)
49-
- [Visualizing Workflow Structure](./how-to/visualizing-workflows.md)
50-
- [Debugging Workflows](./how-to/debugging.md)
51-
- [Debugging Slurm Workflows](./how-to/debugging-slurm.md)
52-
- [Workflow Reports](./how-to/workflow-reports.md)
53-
- [Authentication](./how-to/authentication.md)
54-
- [Shell Completions](./how-to/shell-completions.md)
55-
- [Server Deployment](./how-to/server-deployment.md)
56-
57-
# Reference
39+
- [How-To Guides](./how-to/README.md)
40+
- [Setup]()
41+
- [Configuration Files](./how-to/configuration-files.md)
42+
- [Server Deployment](./how-to/server-deployment.md)
43+
- [Authentication](./how-to/authentication.md)
44+
- [Shell Completions](./how-to/shell-completions.md)
45+
- [Workflows]()
46+
- [Creating Workflows](./how-to/creating-workflows.md)
47+
- [Visualizing Workflow Structure](./how-to/visualizing-workflows.md)
48+
- [Execution]()
49+
- [Working with Slurm](./how-to/slurm.md)
50+
- [HPC Profiles](./how-to/hpc-profiles.md)
51+
- [Remote Workers](./how-to/remote-workers.md)
52+
- [Job Checkpointing](./how-to/checkpointing.md)
53+
- [Monitoring]()
54+
- [Terminal UI (TUI)](./how-to/tui.md)
55+
- [Web Dashboard](./how-to/dashboard.md)
56+
- [Resource Monitoring](./how-to/resource-monitoring.md)
57+
- [Workflow Reports](./how-to/workflow-reports.md)
58+
- [Configuring AI Assistants](./how-to/ai-assistants.md)
59+
- [Troubleshooting]()
60+
- [Debugging Workflows](./how-to/debugging.md)
61+
- [Debugging Slurm Workflows](./how-to/debugging-slurm.md)
5862

5963
- [Reference](./reference/README.md)
6064
- [CLI Reference](./reference/cli.md)
@@ -64,28 +68,31 @@
6468
- [HPC Profiles](./reference/hpc-profiles.md)
6569
- [HPC Deployment](./reference/hpc-deployment.md)
6670
- [Resource Monitoring](./reference/resource-monitoring.md)
67-
- [OpenAPI Specification](./reference/openapi.md)
6871
- [Configuration](./reference/configuration.md)
69-
- [AI Assistant](./reference/ai-assistant.md)
7072
- [Security](./reference/security.md)
71-
72-
# Tutorials
73+
- [OpenAPI Specification](./reference/openapi.md)
7374

7475
- [Tutorials](./tutorials/README.md)
75-
- [Configuration Files](./tutorials/configuration.md)
76-
- [Dashboard Deployment](./tutorials/dashboard-deployment.md)
77-
- [Workflow Wizard](./tutorials/workflow-wizard.md)
78-
- [Many Independent Jobs](./tutorials/many-jobs.md)
79-
- [Diamond Workflow](./tutorials/diamond.md)
80-
- [User Data Dependencies](./tutorials/user-data.md)
81-
- [Simple Parameterization](./tutorials/simple-params.md)
82-
- [Advanced Parameterization](./tutorials/advanced-params.md)
83-
- [Multi-Stage Workflows with Barriers](./tutorials/multi-stage-barrier.md)
84-
- [Map Python functions across workers](./tutorials/map_python_function_across_workers.md)
85-
- [Filtering CLI Output with Nushell](./tutorials/filtering-with-nushell.md)
86-
- [Custom HPC Profile](./tutorials/custom-hpc-profile.md)
87-
- [AI-Assisted Workflow Management](./tutorials/ai-assistant.md)
88-
- [Automatic Failure Recovery](./tutorials/automatic-recovery.md)
76+
- [Getting Started]()
77+
- [Workflow Wizard](./tutorials/workflow-wizard.md)
78+
- [Workflow Patterns]()
79+
- [Many Independent Jobs](./tutorials/many-jobs.md)
80+
- [Diamond Workflow](./tutorials/diamond.md)
81+
- [User Data Dependencies](./tutorials/user-data.md)
82+
- [Parameterization]()
83+
- [Simple Parameterization](./tutorials/simple-params.md)
84+
- [Advanced Parameterization](./tutorials/advanced-params.md)
85+
- [Multi-Stage Workflows with Barriers](./tutorials/multi-stage-barrier.md)
86+
- [Features]()
87+
- [Automatic Failure Recovery](./tutorials/automatic-recovery.md)
88+
- [AI-Assisted Workflow Management](./tutorials/ai-assistant.md)
89+
- [Use Cases]()
90+
- [Map Python functions across workers](./tutorials/map_python_function_across_workers.md)
91+
- [Custom HPC Profile](./tutorials/custom-hpc-profile.md)
92+
- [Tools]()
93+
- [Configuration Files](./tutorials/configuration.md)
94+
- [Dashboard Deployment](./tutorials/dashboard-deployment.md)
95+
- [Filtering CLI Output with Nushell](./tutorials/filtering-with-nushell.md)
8996

9097
---
9198

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# AI Assistant Reference
1+
# Configuring AI Assistants
22

3-
Complete reference for configuring AI assistants (Claude Code, GitHub Copilot) to work with Torc.
3+
Complete guide for configuring AI assistants (Claude Code, GitHub Copilot) to work with Torc.
44

55
## Overview
66

@@ -267,5 +267,5 @@ remains in Torc's database.
267267
## See Also
268268

269269
- [AI-Assisted Workflow Management Tutorial](../tutorials/ai-assistant.md)
270-
- [Configuration Reference](./configuration.md)
271-
- [HPC Deployment](./hpc-deployment.md)
270+
- [Configuration Reference](../reference/configuration.md)
271+
- [HPC Deployment](../reference/hpc-deployment.md)

docs/src/tutorials/ai-assistant.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ allocations have been submitted and will execute these jobs automatically.
340340

341341
## Next Steps
342342

343-
- [AI Assistant Reference](../reference/ai-assistant.md) — Full configuration options, all tools,
343+
- [Configuring AI Assistants](../how-to/ai-assistants.md) — Full configuration options, all tools,
344344
troubleshooting
345345
- [Automatic Failure Recovery](./automatic-recovery.md) — Use `torc watch` for automated recovery
346346
- [Configuration Files](./configuration.md) — Set up Torc configuration

0 commit comments

Comments
 (0)