fix: use sentence case for 'Waiting for sandbox' text (#12958)

Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
Robert Brennan
2026-03-18 11:42:46 -07:00
committed by GitHub
parent 6d86803f41
commit 39a4ca422f
2 changed files with 5 additions and 5 deletions

View File

@@ -11,7 +11,7 @@ import { I18nKey } from "#/i18n/declaration";
// Mock translations
const t = (key: string) => {
const translations: { [key: string]: string } = {
COMMON$WAITING_FOR_SANDBOX: "Waiting For Sandbox",
COMMON$WAITING_FOR_SANDBOX: "Waiting for sandbox",
COMMON$STOPPING: "Stopping",
COMMON$STARTING: "Starting",
COMMON$SERVER_STOPPED: "Server stopped",
@@ -69,7 +69,7 @@ describe("getStatusText", () => {
t,
});
expect(result).toBe(t(I18nKey.COMMON$WAITING_FOR_SANDBOX));
expect(result).toBe("Waiting for sandbox");
});
it("returns task detail when task status is ERROR and detail exists", () => {

View File

@@ -838,7 +838,7 @@ interface GetStatusTextArgs {
* isStartingStatus: false,
* isStopStatus: false,
* curAgentState: AgentState.RUNNING
* }) // Returns "Waiting For Sandbox"
* }) // Returns "Waiting for sandbox"
*/
export function getStatusText({
isPausing = false,
@@ -866,13 +866,13 @@ export function getStatusText({
return t(I18nKey.CONVERSATION$READY);
}
// Format status text: "WAITING_FOR_SANDBOX" -> "Waiting for sandbox"
// Format status text with sentence case: "WAITING_FOR_SANDBOX" -> "Waiting for sandbox"
return (
taskDetail ||
taskStatus
.toLowerCase()
.replace(/_/g, " ")
.replace(/\b\w/g, (c) => c.toUpperCase())
.replace(/^\w/, (c) => c.toUpperCase())
);
}