Keep standard Git and Gitea terminology throughout the app while retaining Hop-specific features and fixing activity avatars to use the transparent Hop asset.

Hop-State: A_06FN8FHGBMQXYG4JKV37Q7R
Hop-Proposal: R_06FN8FGR9GVGJ1EYKH2ZDA0
Hop-Task: T_06FN8E4H2W4WC6RGTA6J6PR
Hop-Attempt: AT_06FN8E4H2WHJGF51012GH8R
This commit is contained in:
2026-07-11 19:53:09 -07:00
committed by Hop
parent 677809506a
commit 67321dd93a
3 changed files with 42 additions and 76 deletions
@@ -0,0 +1,16 @@
{
"id": "P_06FN8E4H2WMV0A2FRBEJRX0",
"task_id": "T_06FN8E4H2W4WC6RGTA6J6PR",
"attempt_id": "AT_06FN8E4H2WHJGF51012GH8R",
"state_id": "P_06FN8E4H2WMV0A2FRBEJRX0",
"prompt": "continue",
"agent_name": "codex",
"status": "proposed",
"created_at": "2026-07-12T02:47:01.143467Z",
"metadata": {
"source_tree": "48439f2b5dea04ed507197a08e6c458125b03066",
"git_commit": "677809506af4287419f33e67451c7993aef49baa",
"attempt_head": "C_06FN8FFK2YRGQHEPR2WS6WG",
"attempt_head_kind": "checkpoint"
}
}
@@ -0,0 +1,17 @@
{
"id": "P_06FN8FA9KQFKT2DMCJYN1T8",
"task_id": "T_06FN8E4H2W4WC6RGTA6J6PR",
"attempt_id": "AT_06FN8E4H2WHJGF51012GH8R",
"state_id": "P_06FN8FA9KQFKT2DMCJYN1T8",
"prompt": "you know what, after thinking about it, i dont think we should be rewording anything at all.. it will just lead to confusion. can you make it so we just use the standard git language in the app",
"agent_name": "codex",
"status": "proposed",
"response_summary": "Keep standard Git and Gitea terminology throughout the app while retaining Hop-specific features and fixing activity avatars to use the transparent Hop asset.",
"created_at": "2026-07-12T02:52:10.525156Z",
"metadata": {
"source_tree": "1ef8669eed5c773514edff3289074ddc2d684d4e",
"git_commit": "c10e01fba8bbe4d5331204f3452d5cbd166ae312",
"attempt_head": "C_06FN8FFK2YRGQHEPR2WS6WG",
"attempt_head_kind": "checkpoint"
}
}
+9 -76
View File
@@ -1,77 +1,13 @@
(() => { (() => {
'use strict'; 'use strict';
const exactLabels = new Map([ function replaceActivityAvatars() {
['Code', 'Files'], if (!/\/activity\/?$/.test(window.location.pathname)) return;
['Issues', 'Tasks'], const main = document.querySelector('[role="main"]');
['Pull Requests', 'Proposals'], if (!main) return;
['Pull requests', 'Proposals'],
['Commits', 'Checkpoints'],
['Branches', 'Attempts'],
['New Issue', 'New Task'],
['Create Issue', 'Create Task'],
['New Pull Request', 'New Proposal'],
['Create Pull Request', 'Create Proposal'],
['Merge Pull Request', 'Accept Proposal'],
['Compare & pull request', 'Review as Proposal'],
]);
const phraseLabels = [ for (const image of main.querySelectorAll('img.ui.avatar, .activity-bar-graph img, .activity-bar-graph-alt img')) {
[/\bPull Requests\b/g, 'Proposals'], image.src = '/assets/img/hop.svg?v=5';
[/\bPull requests\b/g, 'Proposals'],
[/\bpull requests\b/g, 'proposals'],
[/\bNew Issue\b/g, 'New Task'],
[/\bnew issue\b/g, 'new task'],
[/\bIssues\b/g, 'Tasks'],
[/\bissues\b/g, 'tasks'],
[/\bCommits\b/g, 'Checkpoints'],
[/\bBranches\b/g, 'Attempts'],
];
const semanticRoots = [
'#navbar',
'.secondary-nav',
'[role="main"] .ui.header',
'[role="main"] h1',
'[role="main"] h2',
'[role="main"] h3',
'[role="main"] .ui.button',
'[role="main"] .menu',
'[role="main"] .breadcrumb',
'[role="main"] label',
].join(',');
function replaceExactText(root) {
const walker = document.createTreeWalker(root, NodeFilter.SHOW_TEXT);
const nodes = [];
while (walker.nextNode()) nodes.push(walker.currentNode);
for (const node of nodes) {
const original = node.nodeValue;
const trimmed = original.trim();
const replacement = exactLabels.get(trimmed);
if (!replacement) continue;
node.nodeValue = original.replace(trimmed, replacement);
}
}
function replacePhrases(value) {
let result = value;
for (const [pattern, replacement] of phraseLabels) {
result = result.replace(pattern, replacement);
}
return result;
}
function replaceAccessibleLabels(root) {
const attributes = ['aria-label', 'data-text', 'data-tooltip-content', 'placeholder', 'title'];
for (const element of root.querySelectorAll('[aria-label], [data-text], [data-tooltip-content], [placeholder], [title]')) {
for (const attribute of attributes) {
const value = element.getAttribute(attribute);
if (!value) continue;
const replacement = replacePhrases(value);
if (replacement !== value) element.setAttribute(attribute, replacement);
}
} }
} }
@@ -160,8 +96,8 @@
const links = [ const links = [
workflowLink(document.querySelector('.hop-native-prompts-tab'), 'Prompts'), workflowLink(document.querySelector('.hop-native-prompts-tab'), 'Prompts'),
workflowLink(navigationLink('/issues'), 'Tasks'), workflowLink(navigationLink('/issues'), 'Issues'),
workflowLink(navigationLink('/pulls'), 'Proposals'), workflowLink(navigationLink('/pulls'), 'Pull Requests'),
workflowLink(navigationLink('/actions'), 'Actions'), workflowLink(navigationLink('/actions'), 'Actions'),
].filter(Boolean); ].filter(Boolean);
if (!links.length) return; if (!links.length) return;
@@ -440,16 +376,13 @@
const brandLogo = document.querySelector('#navbar-logo img'); const brandLogo = document.querySelector('#navbar-logo img');
if (brandLogo) brandLogo.src = brandLogo.src.replace(/\/img\/(?:logo|hop)\.svg(?:\?.*)?$/, '/img/hop.svg?v=4'); if (brandLogo) brandLogo.src = brandLogo.src.replace(/\/img\/(?:logo|hop)\.svg(?:\?.*)?$/, '/img/hop.svg?v=4');
replaceBrandImages(); replaceBrandImages();
replaceActivityAvatars();
removeHelpNavigation(); removeHelpNavigation();
for (const root of document.querySelectorAll(semanticRoots)) replaceExactText(root);
replaceAccessibleLabels(document);
addPromptsNavigation(); addPromptsNavigation();
addWorkflowSummary(); addWorkflowSummary();
renderPromptPage(); renderPromptPage();
bindInstallationSwitchers(); bindInstallationSwitchers();
bindInstallationCopyButtons(); bindInstallationCopyButtons();
const title = replacePhrases(document.title);
if (title !== document.title) document.title = title;
document.documentElement.dataset.hopNative = 'true'; document.documentElement.dataset.hopNative = 'true';
} }