Skip to content

fix(desktop): compact WorkHub return button - #5087

Open
testikun wants to merge 2 commits into
apache:mainfrom
testikun:codex/issue-5063-workhub-return
Open

fix(desktop): compact WorkHub return button#5087
testikun wants to merge 2 commits into
apache:mainfrom
testikun:codex/issue-5063-workhub-return

Conversation

@testikun

@testikun testikun commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Summary

The Return to WorkHub button above an ordinary Session's composer currently stretches to the reading width and overrides the shared Button styling. Keep it at content width, centered above the composer, and use the shared small secondary Button's appearance and vertical alignment.

Fixes #5063

Verification

  • Node 24: npm run build:test, Desktop renderer build, and Desktop typecheck passed.
  • WorkHub reconstruction E2E: 1 passed. With the original CSS, the same regression fails because the button is 800px wide (expected less than 606px).
  • Changed E2E file: Biome lint passed; git diff --check passed.
  • Ablation: removing all return-button layout rules leaves it left-aligned. Retained only flex display, content width, and centered margins with the existing composer gap.
  • Full workspace tests and repository-wide lint/format were not run.
Before After
Before After

AI use

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: OpenAI Codex authored the CSS change, regression assertions, and this PR description, and ran the recorded checks. The commit includes a Generated-by: OpenAI Codex trailer. The human contributor remains responsible for review and submission.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

@github-actions github-actions Bot added the effort/S Under 100 readable lines label Sep 9, 2026

@jackwener jackwener left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No findings.

At exact head ec1d4d3f4b9a268e8b8f07bd349e8b07f4de0fd5, the production control is already the shared small secondary Button; the page-specific .workhub-return rules were what replaced that appearance and stretched the control across the reading width. This patch removes those overrides and keeps only the three layout properties needed to make the button content-width and horizontally centered.

I rebuilt the Desktop app and ran the focused WorkHub reconstruction E2E suite: 2/2 tests passed. As a regression check, I restored the previous CSS rules while keeping the new test; the production button measured 800 px wide against a 606 px upper bound and the test failed at the intended assertion. Restoring this head made it pass again. The E2E budget check, Biome on both changed files, ASF header audit, and git diff --check also passed.

The hosted test check is completed successfully on this exact head. A synthetic merge with current main (30cf0beb0def57626df3fdbf8c7ab4d0d3436896) completed cleanly and preserves only this PR's two-file patch relative to main. I did not run the full workspace test suite or package builds beyond the Desktop E2E build.


Automated review notice: This comment was posted by an automated review agent operated by jackwener. It is not an independent human review and does not replace one.

The upstream WorkHub redesign removed the old return control and its owning reconstruction flow. Preserve the new upstream UI instead of restoring obsolete CSS and tests. The merged tree is identical to main.

Generated-by: OpenAI Codex
@testikun

Copy link
Copy Markdown
Contributor Author

Automated follow-up by OpenAI Codex on behalf of testikun (not an independent human review).

Synchronized with current main in 4eb331e. Main has replaced the WorkHub presentation and removed the old .workhub-return control and its original reconstruction journey. Restoring that CSS/test would resurrect obsolete UI; the conflict resolution therefore preserves main, and the resulting tree is identical to main (f60fcb1). This PR is superseded by the upstream redesign and no longer has an effective code diff. No replacement button or unrelated behavior was introduced.

@github-actions github-actions Bot added effort/XS Under 10 readable lines and removed effort/S Under 100 readable lines labels Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/XS Under 10 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UI: "返回 WorkHub" button above the composer looks like a stray full-width strip and is not vertically centered

2 participants