@tenonhq/dovetail-dashboard 0.0.24 → 0.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tenonhq/dovetail-dashboard",
3
- "version": "0.0.24",
3
+ "version": "0.0.25",
4
4
  "description": "Update Set Dashboard for Dovetail",
5
5
  "main": "server.js",
6
6
  "scripts": {
@@ -863,8 +863,13 @@
863
863
  }));
864
864
  renderRail();
865
865
  if (!state.selectedSlug) {
866
+ var pathMatch = window.location.pathname.match(/^\/claude-plans\/([a-z0-9][a-z0-9-]{0,63})$/);
867
+ var pathSlug = pathMatch && pathMatch[1];
866
868
  var sorted = sortedPlans();
867
- if (sorted.length > 0) selectPlan(sorted[0].slug);
869
+ var target = pathSlug && state.plans.has(pathSlug)
870
+ ? pathSlug
871
+ : (sorted.length > 0 ? sorted[0].slug : null);
872
+ if (target) selectPlan(target);
868
873
  }
869
874
  }
870
875
 
package/server.js CHANGED
@@ -996,7 +996,7 @@ function startClaudePlanWatcher() {
996
996
  claudePlanWatcher.on("unlink", function (p) { handleWatcherChange("unlink", p); });
997
997
  }
998
998
 
999
- app.get("/claude-plans", function (req, res) {
999
+ app.get(["/claude-plans", "/claude-plans/:slug"], function (req, res) {
1000
1000
  res.sendFile(path.join(__dirname, "public", "claude-plans.html"));
1001
1001
  });
1002
1002