End-to-end setup for the Bulk Copy Stories Between Iterations widget — auth, dev harness, and deploy. Adapted from the wsjf-grid setup guide.
This widget writes to Rally. In live mode it creates new user stories (and tasks) in your workspace. Always test with a non-production project before deploying to customers.
- Node 18+ and npm
- A Rally workspace and project you can access
- A Rally API key (instructions below)
- Sign in to Rally.
- Open the API key page: https://rally1.rallydev.com/#/api_key (or click your avatar → API Keys).
- Click Create, give the key a name (e.g.
widget-dev), pick the workspaces it can access, and copy the full key. It starts with_and is ~43 chars long. - Treat it like a password — don't paste it into anything that gets committed.
Create auth.json in the widget folder:
{
"server": "https://rally1.rallydev.com",
"apiKey": "_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}auth.json is in the root .gitignore, so it never gets committed.
export RALLY_SERVER=https://rally1.rallydev.com
export RALLY_API_KEY=_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxOr drop a .env.local in the widget folder:
RALLY_SERVER=https://rally1.rallydev.com
RALLY_API_KEY=_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxRestart npm run dev after changing credentials.
npm run devOpens at http://localhost:5175. By default, mock data is used.
Append ?live=true to load real Rally data:
http://localhost:5175?live=true
The dev server defaults to mock mode (no Rally connection needed). The mock scenario includes:
- Iteration A — 5 stories (SSO, password reset, session timeout, RBAC, audit log)
- Iteration B — 3 stories (dashboard perf, CSV export, bulk delete)
- Iteration C — 2 stories (mobile layout, offline mode)
copyStories in mock mode simulates network delay (200ms/story) and logs the operation without persisting to Rally. The result summary shows new mock FormattedIDs (US9000, US9001, …).
npx widget-ai deployWhat it does:
- Runs
vite build— emits a singledist/app.jsIIFE with all styles inlined. - Wraps it in a minimal HTML doc that loads React from a CDN.
- Reads
rally.config.jsonfor the widget name and target workspace. - Reads
auth.jsonfor credentials. - Creates or updates the Custom HTML Widget in Rally.
- Prints the Rally URL.
The created/updated view ID is written back into rally.config.json so subsequent deploys hit the same target.
No auth.json found— create one before runningwidget-ai deploy.401 Unauthorizedfrom Rally — API key is revoked. Generate a new one.dist/app.js not found— runnpm run buildand check for errors first.
| Task | Command |
|---|---|
| Edit a component | src/App.tsx — Vite hot-reloads on save |
| Open the settings UI | DevHarness → Gear button |
| Production build | npm run build |
| Mock/demo build | npm run build:mock |
| Deploy to Rally | npx widget-ai deploy |
- Widget README
- widget-ai API docs — component and hook reference