You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by wy...@apache.org on 2026/09/01 14:11:55 UTC

(maka) 09/11: fix(desktop): compact turn approval prompt

This is an automated email from the ASF dual-hosted git repository.

M4n5ter pushed a commit to branch fix/session-share-peer-route-liveness
in repository https://gitbox.apache.org/repos/asf/maka.git

commit ff574d8b8a21b05cfcde313eb8836afc7f718f8e
Author: Wang <m4...@gmail.com>
AuthorDate: Tue Sep 1 20:49:18 2026 +0800

    fix(desktop): compact turn approval prompt
---
 .../ui/session-turn-request-approval.tsx           | 21 +++++++++++++++-
 apps/desktop/src/renderer/styles/shell-layout.css  | 29 ++++++++++++++++++++++
 2 files changed, 49 insertions(+), 1 deletion(-)

diff --git a/apps/desktop/src/renderer/features/session-collaboration/ui/session-turn-request-approval.tsx b/apps/desktop/src/renderer/features/session-collaboration/ui/session-turn-request-approval.tsx
index da35f7a276..5af9737403 100644
--- a/apps/desktop/src/renderer/features/session-collaboration/ui/session-turn-request-approval.tsx
+++ b/apps/desktop/src/renderer/features/session-collaboration/ui/session-turn-request-approval.tsx
@@ -18,6 +18,7 @@
  */
 
 import type { SessionTurnAccessRequest } from '@maka/runtime-host/protocol';
+import { HoverCard } from '@astryxdesign/core/HoverCard';
 import { Banner, Button } from '@maka/ui';
 import {
   useSessionTurnRequestInboxContext,
@@ -55,10 +56,28 @@ export function SessionTurnRequestApproval(props: {
   return (
     <div className="sessionTurnRequestApproval">
       <Banner
+        className="sessionTurnRequestApprovalBanner"
         status="warning"
         role="status"
         title={copy.ownerTurnRequestTitle}
-        description={request.intent.content.text}
+        description={(
+          <HoverCard
+            content={(
+              <div className="sessionTurnRequestApprovalDetails">
+                {request.intent.content.text}
+              </div>
+            )}
+            label={copy.ownerTurnRequestTitle}
+            placement="above"
+            alignment="start"
+            focusTrigger="always"
+            hasHoverIndication={false}
+          >
+            <span className="sessionTurnRequestApprovalIntent" tabIndex={0}>
+              {request.intent.content.text}
+            </span>
+          </HoverCard>
+        )}
         endContent={(
           <div className="sessionTurnRequestApprovalActions">
             <Button
diff --git a/apps/desktop/src/renderer/styles/shell-layout.css b/apps/desktop/src/renderer/styles/shell-layout.css
index 9ab0e91944..11b404d2db 100644
--- a/apps/desktop/src/renderer/styles/shell-layout.css
+++ b/apps/desktop/src/renderer/styles/shell-layout.css
@@ -590,10 +590,39 @@ dialog:modal {
 .sessionTurnRequestApproval {
   display: grid;
   gap: var(--space-1);
+  width: 100%;
+  max-width: 36rem;
+  margin-inline: auto;
   padding: var(--space-2) var(--space-3) 0;
+  box-sizing: border-box;
   background: var(--background);
 }
 
+.sessionTurnRequestApprovalBanner {
+  min-width: 0;
+}
+
+.sessionTurnRequestApprovalIntent {
+  display: block;
+  width: 100%;
+  max-width: 100%;
+  min-width: 0;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+  cursor: help;
+}
+
+.sessionTurnRequestApprovalDetails {
+  width: min(32rem, calc(100vw - 2rem));
+  max-height: min(16rem, 50vh);
+  overflow: auto;
+  white-space: pre-wrap;
+  overscroll-behavior: contain;
+  scrollbar-gutter: stable;
+  user-select: text;
+}
+
 .sessionTurnRequestApprovalActions {
   display: inline-flex;
   align-items: center;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org