René's URL Explorer Experiment


Title: Recall previously-sent prompts in the composer with the Up / Down arrows by DragonnZhang · Pull Request #53 · modelstudioai/openwork · GitHub

Open Graph Title: Recall previously-sent prompts in the composer with the Up / Down arrows by DragonnZhang · Pull Request #53 · modelstudioai/openwork

X Title: Recall previously-sent prompts in the composer with the Up / Down arrows by DragonnZhang · Pull Request #53 · modelstudioai/openwork

Description: Closes #52 What & why Terminal shells, the Claude Code CLI, and the Codex desktop composer all let you recall a prompt you already sent by pressing Up in the composer. OpenWork's composer (FreeFormInput) had no prompt history: once a message was sent it was gone from the input, so re-running or tweaking a previous prompt meant retyping it or copying it back out of the transcript. Outside the inline mention / slash / label menus, ArrowUp / ArrowDown in the composer only moved the caret. This adds shell-style prompt history recall: Each sent prompt is appended to a global history list (newest last), persisted in localStorage (craft-prompt-history), trimmed, with immediate duplicate collapse, capped at 100 entries. Up in an empty composer (or while already recalling) walks backwards (newest → oldest), clamping at the oldest. Down while recalling walks forwards; paging past the newest entry restores the draft you started from and exits recall. Any real edit, submitting, or switching sessions exits recall. With a non-empty draft and not recalling, Up/Down keep normal caret-movement — recall never hijacks editing. Frontend-only. No backend / qwen-code change. Recall drives the existing controlled value prop (the same path @mention selection already uses), and persistence reuses the existing lib/local-storage.ts helper. No new i18n keys. Changes components/app-shell/input/prompt-history.ts (new) — pure, DOM-free history model: pushPromptHistory (trim / immediate-repeat collapse / cap), prevPromptIndex / nextPromptIndex / promptAt (index-based Up/Down navigation), and getPromptHistory / recordPrompt (localStorage round-trip). components/app-shell/input/FreeFormInput.tsx — history refs, an applyRecalledPrompt helper (drives setInput + caret), the ArrowUp/ArrowDown branch in handleKeyDown, recall capture in submitMessage, reset on real edit (handleInputChange) and on session switch, and data-testid="composer-input" on the composer for e2e. lib/local-storage.ts — new promptHistory key (craft-prompt-history). components/app-shell/input/__tests__/prompt-history.test.ts (new) — 20 unit tests for the module. e2e/assertions/prompt-history.assert.ts (new) — CDP assertion (below). Verification (DoD) bun run typecheck:all — zero new errors. packages/{core,shared,server-core,server,session-tools-core} pass clean; packages/ui passes clean (checked independently); the only errors are the 11 pre-existing ones in apps/electron (auto-update.ts owner/repo, a settings-default-thinking test tuple, two test files importing vitest) — none in the files this PR touches. bun test — the set of failing tests is byte-for-byte identical to main, verified by diffing the sorted, timing-stripped failure lists from a clean-main run and this branch in the same environment: 56 pre-existing failures on both (BrowserCDP, RPC handler profiles, RoutedClient, startWebuiHttpServer, the i18n sorted checks, resource-bundle, …). This change adds zero new failures, and adds 20 new passing unit tests (prompt-history.test.ts). (The raw N fail total is order-dependent when the whole suite runs unisolated; the deterministic signal is the failing-test set, which is unchanged.) Renderer build (bun run build:renderer, where this change lives) — ✅ builds cleanly. CDP assertion transpiles (bun build e2e/assertions/prompt-history.assert.ts) — ✅. CDP e2e assertion (prompt-history.assert.ts) Drives the real built app over CDP entirely in the draft (no-session) state — no seeded conversation and no backend. The composer reads its history fresh from localStorage, so the assertion seeds three prior prompts there and walks them: The composer renders and starts empty. Seed localStorage['craft-prompt-history'] = ['alpha one','beta two','gamma three']. ArrowUp recalls the newest (gamma three); further Ups recall beta two, alpha one, and clamp at the oldest. ArrowDown walks newer again (beta two, gamma three) and, once past the newest, restores the original empty draft. Reading the composer's actual text after each keypress proves the arrows really change the composer contents, not merely toggle state. ⚠️ Local CDP run was blocked by this sandbox's egress policy, not by the feature. The Electron binary download (GitHub release host) returns 403 from the egress proxy, so the app can't be built/launched here (xvfb is present; only the binary fetch fails) — the same limitation noted on the other open loop-bot PRs. The assertion transpiles and is included so CI / a reviewer can run bun run e2e in an environment with normal network access. Everything that doesn't require launching Electron (typecheck, unit tests, renderer build) passes with zero delta vs main. Part of the autonomous desktop-feature loop (loop-bot). Generated by Claude Code

Open Graph Description: Closes #52 What & why Terminal shells, the Claude Code CLI, and the Codex desktop composer all let you recall a prompt you already sent by pressing Up in the composer. OpenWork's composer (...

X Description: Closes #52 What & why Terminal shells, the Claude Code CLI, and the Codex desktop composer all let you recall a prompt you already sent by pressing Up in the composer. OpenWork's co...

Opengraph URL: https://github.com/modelstudioai/openwork/pull/53

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:84d5253d-183d-1716-9436-00db50038041
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9CA2:3C0E3A:9417BA:C511E3:6A5278F7
html-safe-noncee3464ea8c0d2d9d938628d3653d31c153b2a39f4f751fbca0669c783b02cc14e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5Q0EyOjNDMEUzQTo5NDE3QkE6QzUxMUUzOjZBNTI3OEY3IiwidmlzaXRvcl9pZCI6IjExMzQ3NjYyNTg3MjM2NDk3ODMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac91feef102286f63e75fd63870a84465248f564efe1449f4568a46390ea37d2f7
hovercard-subject-tagpull_request:3989153508
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/modelstudioai/openwork/pull/53/files
twitter:imagehttps://avatars.githubusercontent.com/u/52599892?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/52599892?s=400&v=4
og:image:altCloses #52 What & why Terminal shells, the Claude Code CLI, and the Codex desktop composer all let you recall a prompt you already sent by pressing Up in the composer. OpenWork's composer (...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/modelstudioai/openwork git https://github.com/modelstudioai/openwork.git
octolytics-dimension-user_id283556804
octolytics-dimension-user_loginmodelstudioai
octolytics-dimension-repository_id1256697754
octolytics-dimension-repository_nwomodelstudioai/openwork
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1256697754
octolytics-dimension-repository_network_root_nwomodelstudioai/openwork
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release07a982c1d40157c619b364352b704c3ce66bb332
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/modelstudioai/openwork/pull/53/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelstudioai%2Fopenwork%2Fpull%2F53%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelstudioai%2Fopenwork%2Fpull%2F53%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=modelstudioai%2Fopenwork
Reloadhttps://github.com/modelstudioai/openwork/pull/53/files
Reloadhttps://github.com/modelstudioai/openwork/pull/53/files
Reloadhttps://github.com/modelstudioai/openwork/pull/53/files
Please reload this pagehttps://github.com/modelstudioai/openwork/pull/53/files
modelstudioai https://github.com/modelstudioai
openworkhttps://github.com/modelstudioai/openwork
Notifications https://github.com/login?return_to=%2Fmodelstudioai%2Fopenwork
Fork 3 https://github.com/login?return_to=%2Fmodelstudioai%2Fopenwork
Star 11 https://github.com/login?return_to=%2Fmodelstudioai%2Fopenwork
Code https://github.com/modelstudioai/openwork
Issues 14 https://github.com/modelstudioai/openwork/issues
Pull requests 12 https://github.com/modelstudioai/openwork/pulls
Actions https://github.com/modelstudioai/openwork/actions
Projects https://github.com/modelstudioai/openwork/projects
Security and quality 0 https://github.com/modelstudioai/openwork/security
Insights https://github.com/modelstudioai/openwork/pulse
Code https://github.com/modelstudioai/openwork
Issues https://github.com/modelstudioai/openwork/issues
Pull requests https://github.com/modelstudioai/openwork/pulls
Actions https://github.com/modelstudioai/openwork/actions
Projects https://github.com/modelstudioai/openwork/projects
Security and quality https://github.com/modelstudioai/openwork/security
Insights https://github.com/modelstudioai/openwork/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fmodelstudioai%2Fopenwork%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fmodelstudioai%2Fopenwork%2Fissues%2Fnew%2Fchoose
DragonnZhanghttps://github.com/DragonnZhang
mainhttps://github.com/modelstudioai/openwork/tree/main
loop/composer-prompt-historyhttps://github.com/modelstudioai/openwork/tree/loop/composer-prompt-history
Conversation 0 https://github.com/modelstudioai/openwork/pull/53
Commits 2 https://github.com/modelstudioai/openwork/pull/53/commits
Checks 0 https://github.com/modelstudioai/openwork/pull/53/checks
Files changed https://github.com/modelstudioai/openwork/pull/53/files
Please reload this pagehttps://github.com/modelstudioai/openwork/pull/53/files
Recall previously-sent prompts in the composer with the Up / Down arrows https://github.com/modelstudioai/openwork/pull/53/files#top
Show all changes 2 commits https://github.com/modelstudioai/openwork/pull/53/files
761736b Add composer prompt-history recall (Up/Down arrows) claude Jul 4, 2026 https://github.com/modelstudioai/openwork/pull/53/commits/761736bfbbe9793377b043c1a6138e1a92c209de
ca4e46f chore: merge main into loop/composer-prompt-history claude Jul 6, 2026 https://github.com/modelstudioai/openwork/pull/53/commits/ca4e46fdcf4b1b69be7440b68eb8b3b20204e1ed
Clear filters https://github.com/modelstudioai/openwork/pull/53/files
Please reload this pagehttps://github.com/modelstudioai/openwork/pull/53/files
Please reload this pagehttps://github.com/modelstudioai/openwork/pull/53/files
FreeFormInput.tsx https://github.com/modelstudioai/openwork/pull/53/files#diff-8f45fdb3e5ebbc0360a53553f9b16be05400782b73a4596dd93949d08fdf1dee
prompt-history.test.ts https://github.com/modelstudioai/openwork/pull/53/files#diff-46e568f104a8b3b2c1b77e9160c93bf2be3671b9b5f138b699c8e8cf6da07e06
prompt-history.ts https://github.com/modelstudioai/openwork/pull/53/files#diff-673ba00786c2fa8c569fea03fd3f3a17e77dbe2e7babc5b3ce514800eebfc3bd
local-storage.ts https://github.com/modelstudioai/openwork/pull/53/files#diff-a2cea16cfa3d50835d57cdaf23004f4d45eb927cfeb38092cefbf20f53640832
feature-ledger.md https://github.com/modelstudioai/openwork/pull/53/files#diff-2ae33a5d5ac052f40e2dfa56a7c3a17353f66baa0e674a59cc228e165b47c1af
prompt-history.assert.ts https://github.com/modelstudioai/openwork/pull/53/files#diff-291388ee2a396dc9c784199e7c4fc0f4240b7d60239cc094a5dd97360f4f4549
apps/electron/src/renderer/components/app-shell/input/FreeFormInput.tsxhttps://github.com/modelstudioai/openwork/pull/53/files#diff-8f45fdb3e5ebbc0360a53553f9b16be05400782b73a4596dd93949d08fdf1dee
View file https://github.com/modelstudioai/openwork/blob/ca4e46fdcf4b1b69be7440b68eb8b3b20204e1ed/apps/electron/src/renderer/components/app-shell/input/FreeFormInput.tsx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelstudioai/openwork/pull/53/{{ revealButtonHref }}
https://github.com/modelstudioai/openwork/pull/53/files#diff-8f45fdb3e5ebbc0360a53553f9b16be05400782b73a4596dd93949d08fdf1dee
https://github.com/modelstudioai/openwork/pull/53/files#diff-8f45fdb3e5ebbc0360a53553f9b16be05400782b73a4596dd93949d08fdf1dee
https://github.com/modelstudioai/openwork/pull/53/files#diff-8f45fdb3e5ebbc0360a53553f9b16be05400782b73a4596dd93949d08fdf1dee
https://github.com/modelstudioai/openwork/pull/53/files#diff-8f45fdb3e5ebbc0360a53553f9b16be05400782b73a4596dd93949d08fdf1dee
https://github.com/modelstudioai/openwork/pull/53/files#diff-8f45fdb3e5ebbc0360a53553f9b16be05400782b73a4596dd93949d08fdf1dee
https://github.com/modelstudioai/openwork/pull/53/files#diff-8f45fdb3e5ebbc0360a53553f9b16be05400782b73a4596dd93949d08fdf1dee
https://github.com/modelstudioai/openwork/pull/53/files#diff-8f45fdb3e5ebbc0360a53553f9b16be05400782b73a4596dd93949d08fdf1dee
https://github.com/modelstudioai/openwork/pull/53/files#diff-8f45fdb3e5ebbc0360a53553f9b16be05400782b73a4596dd93949d08fdf1dee
https://github.com/modelstudioai/openwork/pull/53/files#diff-8f45fdb3e5ebbc0360a53553f9b16be05400782b73a4596dd93949d08fdf1dee
https://github.com/modelstudioai/openwork/pull/53/files#diff-8f45fdb3e5ebbc0360a53553f9b16be05400782b73a4596dd93949d08fdf1dee
https://github.com/modelstudioai/openwork/pull/53/files#diff-8f45fdb3e5ebbc0360a53553f9b16be05400782b73a4596dd93949d08fdf1dee
https://github.com/modelstudioai/openwork/pull/53/files#diff-8f45fdb3e5ebbc0360a53553f9b16be05400782b73a4596dd93949d08fdf1dee
apps/electron/src/renderer/components/app-shell/input/__tests__/prompt-history.test.tshttps://github.com/modelstudioai/openwork/pull/53/files#diff-46e568f104a8b3b2c1b77e9160c93bf2be3671b9b5f138b699c8e8cf6da07e06
View file https://github.com/modelstudioai/openwork/blob/ca4e46fdcf4b1b69be7440b68eb8b3b20204e1ed/apps/electron/src/renderer/components/app-shell/input/__tests__/prompt-history.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelstudioai/openwork/pull/53/{{ revealButtonHref }}
apps/electron/src/renderer/components/app-shell/input/prompt-history.tshttps://github.com/modelstudioai/openwork/pull/53/files#diff-673ba00786c2fa8c569fea03fd3f3a17e77dbe2e7babc5b3ce514800eebfc3bd
View file https://github.com/modelstudioai/openwork/blob/ca4e46fdcf4b1b69be7440b68eb8b3b20204e1ed/apps/electron/src/renderer/components/app-shell/input/prompt-history.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelstudioai/openwork/pull/53/{{ revealButtonHref }}
Please reload this pagehttps://github.com/modelstudioai/openwork/pull/53/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.