You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by as...@apache.org on 2026/08/23 17:55:10 UTC
(maka) branch main updated: fix(desktop): prevent WorkHub result overlap (#3645)
This is an automated email from the ASF dual-hosted git repository.
Astro-Han pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/maka.git
The following commit(s) were added to refs/heads/main by this push:
new 5525be38f fix(desktop): prevent WorkHub result overlap (#3645)
5525be38f is described below
commit 5525be38f3dd1d678a80dd96aa810bf439a2e43c
Author: ChengBo Zhang <66...@users.noreply.github.com>
AuthorDate: Mon Aug 24 01:55:06 2026 +0800
fix(desktop): prevent WorkHub result overlap (#3645)
* fix(desktop): prevent WorkHub result overlap
Allow WorkHub target buttons to grow beyond the fixed medium control height so Session metadata stays clear of the result text. Add an Electron layout regression test.
Generated-by: Codex
* fix(desktop): address WorkHub layout review
---
apps/desktop/e2e/workhub-layout.spec.ts | 64 ++++++++++++++++++++++++++++
apps/desktop/src/renderer/styles/workhub.css | 1 +
docs/astryx-surface-file-inventory.md | 2 +-
3 files changed, 66 insertions(+), 1 deletion(-)
diff --git a/apps/desktop/e2e/workhub-layout.spec.ts b/apps/desktop/e2e/workhub-layout.spec.ts
new file mode 100644
index 000000000..271fd2fc8
--- /dev/null
+++ b/apps/desktop/e2e/workhub-layout.spec.ts
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import { expect, test, COMPOSER_INPUT } from './fixtures';
+
+test('WorkHub target metadata does not overlap the submitted Session result', async ({
+ window: page,
+}) => {
+ const composer = page.locator(COMPOSER_INPUT);
+ await composer.fill('支付回调幂等性');
+ await composer.press('Enter');
+ await expect(page.getByRole('button', { name: '重新生成' })).toHaveCount(1, {
+ timeout: 20_000,
+ });
+
+ const sessionName = await page.evaluate(async () =>
+ (await window.maka.sessions.list())[0]?.name,
+ );
+ expect(sessionName).toBeTruthy();
+ await page.evaluate(async () => {
+ await window.maka.settings.updateClient({ workHub: { enabled: true } });
+ });
+ await expect(page.getByRole('main', { name: 'WorkHub' })).toBeVisible();
+
+ const workHubComposer = page.locator(
+ '.workhub-surface .maka-composer-editor [contenteditable="true"]',
+ );
+ await workHubComposer.fill(`继续${sessionName},补充重复投递测试点。`);
+ await workHubComposer.press('Enter');
+ await expect(page.locator('.workhub-result')).toBeVisible();
+
+ const geometry = await page.evaluate(() => {
+ const button = document.querySelector<HTMLElement>('.workhub-submitted > button')!;
+ const project = button.querySelector<HTMLElement>('.workhub-submitted-session small')!;
+ const result = document.querySelector<HTMLElement>('.workhub-result')!;
+ const buttonBox = button.getBoundingClientRect();
+ const projectBox = project.getBoundingClientRect();
+ const resultBox = result.getBoundingClientRect();
+ return {
+ buttonContainsProject: buttonBox.bottom >= projectBox.bottom,
+ overlapHeight:
+ Math.min(projectBox.bottom, resultBox.bottom) - Math.max(projectBox.top, resultBox.top),
+ };
+ });
+
+ expect(geometry.buttonContainsProject).toBe(true);
+ expect(geometry.overlapHeight).toBeLessThanOrEqual(0);
+});
diff --git a/apps/desktop/src/renderer/styles/workhub.css b/apps/desktop/src/renderer/styles/workhub.css
index 0aadc342a..369a71c03 100644
--- a/apps/desktop/src/renderer/styles/workhub.css
+++ b/apps/desktop/src/renderer/styles/workhub.css
@@ -149,6 +149,7 @@
align-items: flex-start;
justify-content: space-between;
width: 100%;
+ height: auto;
padding: 10px 0;
gap: 16px;
border: 0;
diff --git a/docs/astryx-surface-file-inventory.md b/docs/astryx-surface-file-inventory.md
index 3544e3cde..e60226835 100644
--- a/docs/astryx-surface-file-inventory.md
+++ b/docs/astryx-surface-file-inventory.md
@@ -5,7 +5,7 @@ Each row is one on-disk product surface file. Regenerated inventory must stay in
Wiki bar: Design Conventions · API Use-the-System · Theming · Container Padding.
-**Totals:** 204 files — blocker 0, polish 0, aligned 204.
+**Totals:** 206 files — blocker 0, polish 0, aligned 206.
## Exclusions (explicit)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org