mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 12:24:30 +01:00
Fix mobile chat layout overflow and sticky prompt input
This commit is contained in:
1 parent
57d83b9cd9
commit
9a2ebc9652
7 files changed
+38
-23
No files matched your search
@@ -98,7 +98,7 @@ export const MessageThread = memo(function MessageThread({ opcodeUrl, sessionID,
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex flex-col space-y-2 p-4">
|
||||
<div className="flex flex-col space-y-2 p-4 overflow-x-hidden">
|
||||
{messages.map((msg) => {
|
||||
const streaming = isMessageStreaming(msg)
|
||||
const thinking = isMessageThinking(msg)
|
||||
|
||||
@@ -418,7 +418,7 @@ export function PromptInput({
|
||||
|
||||
|
||||
return (
|
||||
<div className={`backdrop-blur-md bg-background/90 border border-border rounded-lg p-1 md:p-3 mx-2 md:mx-4 md:mb-4 max-w-4xl md:mx-auto ${isStandalone ? 'mb-6' : 'mb-1'}`}>
|
||||
<div className={`backdrop-blur-md bg-background/90 border border-border rounded-lg p-1 md:p-3 mx-2 md:mx-4 md:mb-4 max-w-4xl md:mx-auto pb-safe ${isStandalone ? 'mb-6' : 'mb-2'}`}>
|
||||
|
||||
|
||||
<textarea
|
||||
|
||||
@@ -73,7 +73,7 @@ export function TextPart({ part }: TextPartProps) {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="prose prose-invert prose-enhanced max-w-none text-foreground">
|
||||
<div className="prose prose-invert prose-enhanced max-w-none text-foreground overflow-hidden break-words">
|
||||
<ReactMarkdown
|
||||
remarkPlugins={[remarkGfm]}
|
||||
rehypePlugins={[rehypeHighlight, rehypeRaw]}
|
||||
|
||||
@@ -114,7 +114,7 @@ export function ToolCallPart({ part, onFileClick }: ToolCallPartProps) {
|
||||
<div className="border border-border rounded-lg overflow-hidden my-2">
|
||||
<button
|
||||
onClick={() => setExpanded(!expanded)}
|
||||
className="w-full px-4 py-2 bg-card hover:bg-card-hover text-left flex items-center gap-2 text-sm"
|
||||
className="w-full px-4 py-2 bg-card hover:bg-card-hover text-left flex items-center gap-2 text-sm min-w-0"
|
||||
>
|
||||
<span className={getStatusColor()}>{getStatusIcon()}</span>
|
||||
<span className="font-medium">{part.tool}</span>
|
||||
|
||||
@@ -54,12 +54,24 @@ body {
|
||||
transition: background-color 0.3s ease, color 0.3s ease;
|
||||
min-height: 100vh;
|
||||
min-height: 100dvh;
|
||||
overflow: hidden;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#root {
|
||||
height: 100vh;
|
||||
height: 100dvh;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
:root:not(.dark) body {
|
||||
background: linear-gradient(to bottom right, #ffffff, #f0f0f0, #ffffff);
|
||||
min-height: 100vh;
|
||||
min-height: 100dvh;
|
||||
overflow: hidden;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* Custom animations */
|
||||
@@ -123,6 +135,8 @@ body {
|
||||
|
||||
.prose-enhanced {
|
||||
line-height: 1.7;
|
||||
word-break: break-word;
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
.prose-enhanced p {
|
||||
@@ -212,3 +226,7 @@ body {
|
||||
.prose-enhanced :last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.pb-safe {
|
||||
padding-bottom: env(safe-area-inset-bottom, 0px);
|
||||
}
|
||||
@@ -133,7 +133,7 @@ export function SessionDetail() {
|
||||
|
||||
|
||||
return (
|
||||
<div className="h-screen bg-gradient-to-br from-background via-background to-background flex flex-col">
|
||||
<div className="h-dvh max-h-dvh overflow-hidden bg-gradient-to-br from-background via-background to-background flex flex-col">
|
||||
<SessionDetailHeader
|
||||
repo={repo}
|
||||
sessionId={sessionId}
|
||||
@@ -147,8 +147,8 @@ export function SessionDetail() {
|
||||
onSessionTitleUpdate={handleSessionTitleUpdate}
|
||||
/>
|
||||
|
||||
<div className="flex-1 overflow-hidden relative">
|
||||
<div ref={messageContainerRef} className="h-full overflow-y-auto pb-32">
|
||||
<div className="flex-1 overflow-hidden flex flex-col">
|
||||
<div ref={messageContainerRef} className="flex-1 overflow-y-auto overflow-x-hidden">
|
||||
{opcodeUrl && repoDirectory && (
|
||||
<MessageThread
|
||||
opcodeUrl={opcodeUrl}
|
||||
@@ -160,20 +160,18 @@ export function SessionDetail() {
|
||||
)}
|
||||
</div>
|
||||
{opcodeUrl && repoDirectory && (
|
||||
<div className="absolute bottom-0 left-0 right-0 pointer-events-none">
|
||||
<div className="pointer-events-auto">
|
||||
<PromptInput
|
||||
opcodeUrl={opcodeUrl}
|
||||
directory={repoDirectory}
|
||||
sessionID={sessionId}
|
||||
disabled={!isConnected}
|
||||
onShowModelsDialog={() => setModelDialogOpen(true)}
|
||||
onShowSessionsDialog={() => setSessionsDialogOpen(true)}
|
||||
onShowHelpDialog={() => {
|
||||
openSettings()
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<div className="flex-shrink-0">
|
||||
<PromptInput
|
||||
opcodeUrl={opcodeUrl}
|
||||
directory={repoDirectory}
|
||||
sessionID={sessionId}
|
||||
disabled={!isConnected}
|
||||
onShowModelsDialog={() => setModelDialogOpen(true)}
|
||||
onShowSessionsDialog={() => setSessionsDialogOpen(true)}
|
||||
onShowHelpDialog={() => {
|
||||
openSettings()
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
+1
-2
@@ -19,8 +19,7 @@
|
||||
"docker:up": "docker-compose up -d",
|
||||
"docker:down": "docker-compose down -v",
|
||||
"docker:logs": "docker-compose logs -f",
|
||||
"docker:restart": "docker-compose restart",
|
||||
|
||||
"docker:restart": "docker-compose restart"
|
||||
},
|
||||
"devDependencies": {
|
||||
"concurrently": "^9.1.0"
|
||||
|
||||
Reference in new issue
Block a user