fix/#43: 슬랙 메시지 타입 오류 수정 및 comment input이 길어질 시 동적으로 조절되도록 변경#45
fix/#43: 슬랙 메시지 타입 오류 수정 및 comment input이 길어질 시 동적으로 조절되도록 변경#45sung-silver merged 6 commits intodevelopfrom
Conversation
|
Warning Rate limit exceeded
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 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
Walkthrough텍스트 입력 컴포넌트를 Changes입력 컴포넌트 마이그레이션
Slack 메시지 빌더 재구성
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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. Review rate limit: 0/1 reviews remaining, refill in 32 minutes.Comment |
There was a problem hiding this comment.
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은 모듈 내부에서만 유효합니다.slackSendDm의blocks: 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);이렇게 하면
formatList의replace(/^[-•]\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/functionsAs per coding guidelines: "After modifying Edge Functions, run
supabase functions deploy notify-sprint; git push alone does not deploy Edge Function changes" — 함수명(notify-sprintvssend-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
📒 Files selected for processing (7)
CLAUDE.mdsrc/components/common/form/TextAreaField.tsxsrc/components/index.tssrc/components/peer-comment/PeerCommentBlock.tsxsrc/pages/MvpPage.tsxsupabase/functions/send-sprint-dm/message.tssupabase/functions/send-sprint-dm/slack.ts
Related Issue 🚀
Work Description ✏️
PR Point 📸