Skip to content

fix/#43: 슬랙 메시지 타입 오류 수정 및 comment input이 길어질 시 동적으로 조절되도록 변경#45

Merged
sung-silver merged 6 commits intodevelopfrom
fix/#43
May 3, 2026
Merged

fix/#43: 슬랙 메시지 타입 오류 수정 및 comment input이 길어질 시 동적으로 조절되도록 변경#45
sung-silver merged 6 commits intodevelopfrom
fix/#43

Conversation

@sung-silver
Copy link
Copy Markdown
Contributor

@sung-silver sung-silver commented May 3, 2026

Related Issue 🚀

Work Description ✏️

  • 슬랙 메시지 포맷 수정
image
  • 코멘트 입력 동적으로 조절
image

PR Point 📸

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 3, 2026

Warning

Rate limit exceeded

@sung-silver has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 32 minutes before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5f08acf8-a09b-496d-8fd5-678c2dfb37cb

📥 Commits

Reviewing files that changed from the base of the PR and between 972205c and e1f46c2.

📒 Files selected for processing (2)
  • src/components/common/form/TextAreaField.tsx
  • supabase/functions/send-sprint-dm/message.ts

Walkthrough

텍스트 입력 컴포넌트를 InputField에서 TextAreaField로 마이그레이션하고, Slack 메시지 빌더를 unknown[]에서 타입된 Block[]로 변경했으며, 메시지 레이아웃 및 텍스트를 재구성했습니다.

Changes

입력 컴포넌트 마이그레이션

Layer / File(s) Summary
컴포넌트 정의 및 타입
src/components/common/form/TextAreaField.tsx
InputField에서 TextAreaField로 컴포넌트 이름 변경. TextField 대신 TextArea를 렌더링하고 TopAddon으로 FieldBoxLabel을 추가. Props 형태(labelText, required?, placeholder?, value, onChange)는 동일하지만 HTMLTextAreaElement 이벤트로 핸들링 변경.
배럴 내보내기 업데이트
src/components/index.ts
InputField 내보내기 제거, TextAreaField 내보내기 추가.
컴포넌트 사용처 업데이트
src/components/peer-comment/PeerCommentBlock.tsx, src/pages/MvpPage.tsx
댓글 입력 및 MVP 선정 이유 입력 폼에서 InputFieldTextAreaField로 교체. Props 연결 방식은 동일하게 유지.
문서 업데이트
CLAUDE.md
네이밍 규칙 예시에서 Field 행의 샘플 컴포넌트명을 InputField에서 TextAreaField로 변경.

Slack 메시지 빌더 재구성

Layer / File(s) Summary
타입 정의
supabase/functions/send-sprint-dm/message.ts
새로운 Block 타입 추가(type: string; [key: string]: unknown).
메시지 생성 로직
supabase/functions/send-sprint-dm/message.ts
buildSlackMessage 함수 시그니처를 slackUserName 매개변수 추가로 확장. 반환 타입을 unknown[]에서 Block[]로 변경. 헤더, 컨텍스트(elements 포함), 섹션, 구분선으로 구성된 Block Kit 구조로 재작성. formatList 헬퍼 함수 추가하여 글머리 기호 통일. 메시지 템플릿 및 텍스트 업데이트(slackUserName, sprintName 참조).
메시지 전송 텍스트
supabase/functions/send-sprint-dm/slack.ts
slackSendDmchat.postMessage 텍스트를 '스프린트 피드백이 도착했어요! 🐮'에서 '🐮 너목들 메시지가 도착했어요!'로 변경.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

텍스트의 영역이 넓어져 🐰
더 많은 말들을 담을 수 있게,
Slack 메시지도 단정하게 정렬되고,
피드백은 더 반짝반짝하게 빛나요! ✨
입력의 마법, 이제 완성!

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive PR 설명이 제공된 템플릿 구조를 따르고 있으나, Work Description 섹션의 내용이 이미지만 포함되어 있고 구체적인 변경 설명이 부족합니다. Work Description 섹션에 이미지만이 아닌 구체적인 변경 사항에 대한 텍스트 설명을 추가해주세요. PR Point 섹션도 채워주시기 바랍니다.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 두 가지 주요 변경사항(Slack 메시지 타입 오류 수정, comment input 동적 조절)을 명확하게 요약하고 있으며, 변경사항과 일치합니다.
Linked Issues check ✅ Passed PR의 코드 변경사항이 이슈 #43의 두 가지 요구사항을 모두 충족합니다: Slack 메시지 블록 문법 수정 및 comment input을 TextAreaField로 대체하여 동적으로 조절되도록 구현했습니다.
Out of Scope Changes check ✅ Passed 모든 변경사항이 이슈 #43의 범위 내에 있습니다. 문서 업데이트, 컴포넌트 교체, export 변경, Slack 메시지 포맷 수정 모두 명시된 목표와 관련이 있습니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/#43

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 32 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
CLAUDE.md (1)

97-97: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

문서 내 InputField 참조가 최신화되지 않았습니다.

Line 97의 패키지 구조 트리에 InputField가 남아 있으나, 이번 PR에서 TextAreaField로 교체되었습니다.

📝 수정 제안
-│   │   ├── form/                (SelectField, InputField)
+│   │   ├── form/                (SelectField, TextAreaField)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@CLAUDE.md` at line 97, 문서의 패키지 구조 트리에서 더 이상 사용되지 않는 InputField 참조를
TextAreaField로 교체하세요: CLAUDE.md 내 ui/ 항목(예: ContentHeading, ImageSection,
ProgressBar, MemberChip, FieldSection 나열 부분)에서 "InputField" 항목을 찾아 이름을
"TextAreaField"로 업데이트하고 관련 설명이나 목록이 있다면 동일하게 반영해 주세요.
🧹 Nitpick comments (3)
supabase/functions/send-sprint-dm/message.ts (3)

1-1: ⚡ Quick win

Block 타입이 export되지 않아 slack.ts에서 활용 불가

현재 type Block은 모듈 내부에서만 유효합니다. slackSendDmblocks: unknown[] 시그니처를 Block[]로 강화하려면 이 타입을 export해야 합니다.

♻️ 리팩토링 제안
-type Block = { type: string; [key: string]: unknown };
+export type Block = { type: string; [key: string]: unknown };

이후 slack.ts에서:

+import type { Block } from './message.ts';
 
-export async function slackSendDm(token: string, slackUserName: string, blocks: unknown[]): Promise<string> {
+export async function slackSendDm(token: string, slackUserName: string, blocks: Block[]): Promise<string> {
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@supabase/functions/send-sprint-dm/message.ts` at line 1, 현재 모듈 내부에만 선언된 type
Block을 외부에서 사용할 수 있도록 export하세요: export type Block = { type: string; [key:
string]: unknown }; 그런 다음 slackSendDm 함수 시그니처의 blocks: unknown[]를 blocks:
Block[]로 강화하고, slack.ts에서 해당 타입을 import해 사용하도록 변경하세요(참조: Block 타입 이름과
slackSendDm 함수 이름).

17-20: ⚡ Quick win

접두사를 이중으로 처리하는 불필요한 변환

Lines 17-20에서 각 항목에 접두사를 먼저 붙이고, Line 44의 formatList에서 다시 ^[-•]\s*를 제거한 뒤 를 재부착합니다. 동작은 올바르지만 코드 의도가 불분명합니다.

♻️ 리팩토링 제안 — 배열 생성 시 bullet 제거, formatList에서만 관리
-  const starts = rows.filter((r) => r.type === 'start').map((r) => `• ${r.content}`);
-  const continues = rows.filter((r) => r.type === 'continue').map((r) => `• ${r.content}`);
-  const stops = rows.filter((r) => r.type === 'stop').map((r) => `• ${r.content}`);
-  const mvps = rows.filter((r) => r.type === 'mvp').map((r) => `• ${r.content}`);
+  const starts = rows.filter((r) => r.type === 'start').map((r) => r.content);
+  const continues = rows.filter((r) => r.type === 'continue').map((r) => r.content);
+  const stops = rows.filter((r) => r.type === 'stop').map((r) => r.content);
+  const mvps = rows.filter((r) => r.type === 'mvp').map((r) => r.content);

이렇게 하면 formatListreplace(/^[-•]\s*/, '') 처리도 제거할 수 있습니다:

-  const formatList = (arr: string[]) => arr.map((v) => `• ${v.replace(/^[-•]\s*/, '')}`).join('\n');
+  const formatList = (arr: string[]) => arr.map((v) => `• ${v}`).join('\n');

Also applies to: 44-44

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@supabase/functions/send-sprint-dm/message.ts` around lines 17 - 20, The
arrays starts/continues/stops/mvps are currently pre-pending "• " and then
formatList strips and re-adds bullets, causing duplicated intent and unclear
code; change the maps in the starts/continues/stops/mvps expressions to stop
adding the "• " prefix (map to r.content only) and move bullet formatting solely
into formatList (or alternately, remove the replace(/^[-•]\s*/, '') line in
formatList if you prefer keeping the maps as-is); update references to
formatList so it is the single place that normalizes and adds the "• " prefix.

1-104: Edge Function 변경 사항은 수동 배포가 필요합니다

git push만으로는 Supabase Edge Function 변경 사항이 반영되지 않습니다. 수정 후 직접 배포 명령어를 실행해야 합니다.

코딩 가이드라인에는 notify-sprint 함수명이 명시되어 있으나 수정된 함수는 send-sprint-dm입니다. 실제 배포 대상 함수명을 확인하고 아래 명령어를 실행해 주세요:

#!/bin/bash
# 배포 대상 Edge Function 이름 확인
fd -t d --base-directory supabase/functions

As per coding guidelines: "After modifying Edge Functions, run supabase functions deploy notify-sprint; git push alone does not deploy Edge Function changes" — 함수명(notify-sprint vs send-sprint-dm)을 확인한 뒤 올바른 이름으로 배포하세요.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@supabase/functions/send-sprint-dm/message.ts` around lines 1 - 104, The Edge
Function was changed but Edge Functions require manual deploys—confirm the
actual deployed function name (the repo uses notify-sprint in docs but this code
lives under send-sprint-dm) and then run the Supabase deploy for the correct
function; locate the function implementation (buildSlackMessage in this diff) to
verify which Edge Function folder/name to deploy, use fd or ls to list
supabase/functions directories, and run supabase functions deploy
<correct-function-name> (e.g., supabase functions deploy send-sprint-dm or
supabase functions deploy notify-sprint) to publish your changes.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@supabase/functions/send-sprint-dm/message.ts`:
- Line 21: The variable nameDisplay is computed as a null-safe display for
slackUserName but never used, causing a `<@null>` bug when slackUserName is
null; update the message construction that currently interpolates slackUserName
(the template at the message creation using `<@${slackUserName}>`) to use
nameDisplay instead, and remove or keep the original const as needed so the
message shows `<@id>` when present or `*${name}*` when slackUserName is null
(referencing the nameDisplay and slackUserName symbols and the message
construction that currently inserts slackUserName).

---

Outside diff comments:
In `@CLAUDE.md`:
- Line 97: 문서의 패키지 구조 트리에서 더 이상 사용되지 않는 InputField 참조를 TextAreaField로 교체하세요:
CLAUDE.md 내 ui/ 항목(예: ContentHeading, ImageSection, ProgressBar, MemberChip,
FieldSection 나열 부분)에서 "InputField" 항목을 찾아 이름을 "TextAreaField"로 업데이트하고 관련 설명이나
목록이 있다면 동일하게 반영해 주세요.

---

Nitpick comments:
In `@supabase/functions/send-sprint-dm/message.ts`:
- Line 1: 현재 모듈 내부에만 선언된 type Block을 외부에서 사용할 수 있도록 export하세요: export type Block
= { type: string; [key: string]: unknown }; 그런 다음 slackSendDm 함수 시그니처의 blocks:
unknown[]를 blocks: Block[]로 강화하고, slack.ts에서 해당 타입을 import해 사용하도록 변경하세요(참조:
Block 타입 이름과 slackSendDm 함수 이름).
- Around line 17-20: The arrays starts/continues/stops/mvps are currently
pre-pending "• " and then formatList strips and re-adds bullets, causing
duplicated intent and unclear code; change the maps in the
starts/continues/stops/mvps expressions to stop adding the "• " prefix (map to
r.content only) and move bullet formatting solely into formatList (or
alternately, remove the replace(/^[-•]\s*/, '') line in formatList if you prefer
keeping the maps as-is); update references to formatList so it is the single
place that normalizes and adds the "• " prefix.
- Around line 1-104: The Edge Function was changed but Edge Functions require
manual deploys—confirm the actual deployed function name (the repo uses
notify-sprint in docs but this code lives under send-sprint-dm) and then run the
Supabase deploy for the correct function; locate the function implementation
(buildSlackMessage in this diff) to verify which Edge Function folder/name to
deploy, use fd or ls to list supabase/functions directories, and run supabase
functions deploy <correct-function-name> (e.g., supabase functions deploy
send-sprint-dm or supabase functions deploy notify-sprint) to publish your
changes.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: fd35ed2a-3cbb-4a5f-874f-8d01b762bf7b

📥 Commits

Reviewing files that changed from the base of the PR and between e1fc700 and 972205c.

📒 Files selected for processing (7)
  • CLAUDE.md
  • src/components/common/form/TextAreaField.tsx
  • src/components/index.ts
  • src/components/peer-comment/PeerCommentBlock.tsx
  • src/pages/MvpPage.tsx
  • supabase/functions/send-sprint-dm/message.ts
  • supabase/functions/send-sprint-dm/slack.ts

Comment thread supabase/functions/send-sprint-dm/message.ts
@sung-silver sung-silver merged commit 9b93dfd into develop May 3, 2026
1 check passed
@sung-silver sung-silver deleted the fix/#43 branch May 3, 2026 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: slack block 문법 및 comment 입력 컴포넌트 동적으로 조정되도록 수정

1 participant