Skip to content

Commit aff8861

Browse files
committed
fix: 채널 패널 렌더링 통일, 타이틀 형식 개선, 한국어 IME 이중전송 버그 수정
1 parent e8578ba commit aff8861

3 files changed

Lines changed: 25 additions & 9 deletions

File tree

src/app/components/ChannelPanel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ export function ChannelPanel({ repoId, repoName, onOpenThread, onOpenInvite }: C
182182
};
183183

184184
const handleMessageKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {
185-
if (event.key === 'Enter') {
185+
if (event.key === 'Enter' && !event.nativeEvent.isComposing) {
186186
event.preventDefault();
187187
handleSendMessage();
188188
}

src/app/components/ChatPanel.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ export function ChatPanel({ title, messages, onSendMessage, showAISummary = true
156156
};
157157

158158
const handleKeyPress = (e: React.KeyboardEvent) => {
159-
if (e.key === 'Enter' && !e.shiftKey) {
159+
if (e.key === 'Enter' && !e.shiftKey && !e.nativeEvent.isComposing) {
160160
e.preventDefault();
161161
handleSend();
162162
}
@@ -275,11 +275,12 @@ export function ChatPanel({ title, messages, onSendMessage, showAISummary = true
275275
<div className="flex items-center justify-between px-6 py-4" style={{
276276
borderBottom: '1px solid rgba(32, 227, 255, 0.14)'
277277
}}>
278-
<h3 className="m-0 tracking-[-0.065em]" style={{
278+
<h3 className="m-0 flex items-center gap-2 tracking-[-0.065em]" style={{
279279
fontSize: '18px',
280280
fontWeight: 950,
281281
color: 'var(--white)'
282282
}}>
283+
<Hash size={18} style={{ color: 'var(--neon-cyan)', flexShrink: 0 }} />
283284
{title}
284285
</h3>
285286
{showAISummary && (

src/app/pages/ChatPage.tsx

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,11 @@ export function ChatPage() {
425425
: "grid h-[calc(100vh-160px)] min-h-0 gap-6 overflow-hidden";
426426
const selectedChannelMeta = ALL_SIDEBAR_CHANNELS.find((channel) => channel.id === selectedChannel);
427427
const selectedCustomChannel = customChannels.find(ch => ch.id === selectedChannel);
428-
const selectedChannelTitle = selectedCustomChannel?.label
428+
const selectedChannelTitle = selectedChannel === 'pull-requests'
429+
? `${currentRepo?.name ?? '레포'} - PR`
430+
: selectedChannel === 'issues'
431+
? `${currentRepo?.name ?? '레포'} - 이슈`
432+
: selectedCustomChannel?.label
429433
?? selectedChannelMeta?.label
430434
?? selectedChannel.split('-').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join(' ');
431435

@@ -1101,7 +1105,7 @@ export function ChatPage() {
11011105

11021106
{hasRepositories ? (
11031107
<div className="flex flex-1 flex-col overflow-y-auto">
1104-
<div className="grid gap-2">
1108+
<div className="grid gap-2 min-w-0">
11051109
{renderSidebarChannel({ id: 'overview', label: '통합 개요', icon: Home })}
11061110

11071111
<div className="my-1" style={{ borderTop: '1px solid rgba(32, 227, 255, 0.14)' }} />
@@ -1438,8 +1442,8 @@ export function ChatPage() {
14381442
const isRepoBodyActive = selectedRepository === repo.id && selectedChannel === repoChannelId;
14391443

14401444
return (
1441-
<div key={repo.id} className="grid gap-1">
1442-
<div className="relative isolate flex w-full items-center rounded-full">
1445+
<div key={repo.id} className="grid gap-1 min-w-0">
1446+
<div className="relative isolate flex w-full min-w-0 items-center rounded-full">
14431447
{isRepoBodyActive && (
14441448
<motion.div
14451449
layoutId="workspaceSidebarActiveTab"
@@ -1690,15 +1694,26 @@ export function ChatPage() {
16901694
<ERDPage embedded />
16911695
) : selectedChannel === 'docs' ? (
16921696
<DocsPage embedded />
1693-
) : selectedChannel === 'general' ? (
1694-
<ChannelPanel onOpenThread={handleOpenThread} onOpenInvite={() => setTeamInviteOpen(true)} />
1697+
) : selectedChannel === 'general' || customChannels.some(ch => ch.id === selectedChannel) ? (
1698+
<ChannelPanel
1699+
repoName={customChannels.find(ch => ch.id === selectedChannel)?.label}
1700+
onOpenThread={handleOpenThread}
1701+
onOpenInvite={() => setTeamInviteOpen(true)}
1702+
/>
16951703
) : REPO_CHANNEL_IDS_REVERSE[selectedChannel] !== undefined ? (
16961704
<ChannelPanel
16971705
repoId={REPO_CHANNEL_IDS_REVERSE[selectedChannel]}
16981706
repoName={repositories.find(r => r.id === REPO_CHANNEL_IDS_REVERSE[selectedChannel])?.name}
16991707
onOpenThread={handleOpenThread}
17001708
onOpenInvite={() => setTeamInviteOpen(true)}
17011709
/>
1710+
) : repositories.find(r => r.id === selectedChannel) ? (
1711+
<ChannelPanel
1712+
repoId={selectedChannel}
1713+
repoName={repositories.find(r => r.id === selectedChannel)?.name}
1714+
onOpenThread={handleOpenThread}
1715+
onOpenInvite={() => setTeamInviteOpen(true)}
1716+
/>
17021717
) : selectedChannel === 'team' ? (
17031718
<TeamPanel
17041719
onInvite={() => setTeamInviteOpen(true)}

0 commit comments

Comments
 (0)