Starter template picker for "New bot"
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- javascript, typescript
Research direction
Start with ui/src/App.tsx and ui/src/components/navbar.tsx to trace how “Create new application” calls doCreateApp, then read SamplePage.doClone in ui/src/page/sample/samplePage.tsx for the existing create, seed, arena, restart, and navigation flow. Check the sample bot files under ui/public/samples/ for reusable templates. Done means users can choose a starter or blank source and create an app through the existing flow, with app and arena caps handled.
Written by the indexing model from the issue text.
Description
"New bot" offers a few skeletons (aggressive, defensive, scout) rather than a blank file.
Effort: S
Migrated from ENHANCEMENTS.md (§1 Approachability & onboarding).
Implementation notes
Priority: low — Cosmetic onboarding polish for new-bot creation; no stability/security impact and touches only a niche first-run UX moment.
Purpose
Today "Create new application" (ui/src/components/navbar.tsx → App.tsx's doCreateApp) always creates a blank-source app and drops the author straight into an empty editor — a rough on-ramp for new users. Offering a small set of starter skeletons (aggressive/defensive/scout, plus "blank") gives new authors a working, editable starting point and a faster path to their first running match, without touching the sandbox or simulation engine.
Implementation approach
- Add a picker UI (new modal/component, e.g.
ui/src/components/newAppModal.tsx) triggered fromdoCreateAppinui/src/App.tsx(currently posts blank immediately) andNavDropdown.Item"Create new application" inui/src/components/navbar.tsx. - Reuse the exact create→seed→add→restart→navigate sequence already implemented in
SamplePage.doClone(ui/src/page/sample/samplePage.tsx):POST /api/user/:userId/app→PUT /api/user/:userId/app/:appId/source(raw text body) →PUT /api/user/:userId/arena/app/:appId→POST /api/user/:userId/arena/restart→navigate. No new REST/MCP endpoints needed — this is pure UI composition overserver/src/api/app.tsandapi/arena.ts. - Author 3-4 short starter source strings (aggressive/defensive/scout/blank) client-side as string constants (or new static files under
ui/public/samples/mirroring existing samples likemarksman.js/survivor.js/squad.jsfor tone/style), each using only the documented bot API fromserver/src/util/compiler.ts(bot.turn,bot.radar.scan,bot.turret.fire, events). - No changes to
server/src/util/simulation.ts,ui/src/util/simulate.ts, orcompiler.ts— this is purely an authoring-flow feature, not a physics/bot-API change.
Key details to plan
- No DB schema change:
AppService.create(server/src/services/AppService.ts) still inserts empty source; the picker just calls the existingsourcePUT immediately after create, same as cloning a sample — no migration needed (consistent with #142's no-migrations-yet state). - Respect existing caps:
MAX_APPS_PER_USER(server/src/api/app.ts) and the arena roster cap (MAX_APPS_PER_ARENA = 5mirrored insamplePage.tsx); reuseSamplePage's roster-count check pattern for the "add to arena" step's disabled/error states. - No sandbox/security implications (seeded templates are trusted, authored source, same as samples) and no SSE/reducer/determinism impact.
- Testing: primarily UI — a new component test for the picker plus an update to any navbar/App interaction tests; no new server test files needed since no server behavior changes (existing
api.test.tscoverage of app create/source PUT already exercises the reused endpoints). - Consider consolidating templates with the sample-bot content (avoid duplicating "aggressive/defensive/scout" logic separately from
ui/public/samples/*.js) to keep one canonical source of example strategies. - Effort/risk: S, low risk — additive UI-only feature layered on stable, already-proven endpoints.
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 0
- Avg merge
- 8m
- Merged PRs (30d)
- 8
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from LeeAdcock/robocodeJs.com
-
priority: medium tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
LeeAdcock/robocodeJs.com#411 ·
Maintainers usually reply within 1 day
-
enhancement priority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
LeeAdcock/robocodeJs.com#254 ·
Maintainers usually reply within 1 day
-
good first issue priority: low tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
LeeAdcock/robocodeJs.com#146 ·
Maintainers usually reply within 1 day
-
dependencies priority: low tech-debt
Difficulty 1/5 Under an hour Newbie friendliness 15/100
LeeAdcock/robocodeJs.com#413 ·
Maintainers usually reply within 1 day
-
priority: low tech-debt
Difficulty 3/5 Half a day Newbie friendliness 32/100
LeeAdcock/robocodeJs.com#412 ·
Maintainers usually reply within 1 day
All issues in LeeAdcock/robocodeJs.com
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
db-ux-design-system/core-web#8461 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Cannot run an integration on windows when power shell is selected as the default profile terminalOpenPriority/Blocker Type/Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
wso2/product-integrator#2767 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
severity:low
Difficulty 1/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day