Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions apps/web/src/components/ChatView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3237,14 +3237,14 @@ export default function ChatView(props: ChatViewProps) {
{/* Top bar */}
<header
className={cn(
"border-b border-border px-3 sm:px-5",
"border-b border-border",
isElectron
? cn(
"drag-region flex h-[52px] items-center wco:h-[env(titlebar-area-height)]",
"drag-region flex h-[52px] items-center px-3 sm:px-5 wco:h-[env(titlebar-area-height)]",
reserveTitleBarControlInset &&
"wco:pr-[calc(100vw-env(titlebar-area-width)-env(titlebar-area-x)+1em)]",
)
: "py-2 sm:py-3",
: "pb-2 pl-[calc(env(safe-area-inset-left)+0.75rem)] pr-[calc(env(safe-area-inset-right)+0.75rem)] pt-[calc(env(safe-area-inset-top)+0.5rem)] sm:pb-3 sm:pl-[calc(env(safe-area-inset-left)+1.25rem)] sm:pr-[calc(env(safe-area-inset-right)+1.25rem)] sm:pt-[calc(env(safe-area-inset-top)+0.75rem)]",
)}
>
<ChatHeader
Expand Down Expand Up @@ -3330,7 +3330,14 @@ export default function ChatView(props: ChatViewProps) {
</div>

{/* Input bar */}
<div className={cn("px-3 pt-1.5 sm:px-5 sm:pt-2", isGitRepo ? "pb-1" : "pb-3 sm:pb-4")}>
<div
className={cn(
"pl-[calc(env(safe-area-inset-left)+0.75rem)] pr-[calc(env(safe-area-inset-right)+0.75rem)] pt-1.5 sm:pl-[calc(env(safe-area-inset-left)+1.25rem)] sm:pr-[calc(env(safe-area-inset-right)+1.25rem)] sm:pt-2",
isGitRepo
? "pb-[calc(env(safe-area-inset-bottom)+0.25rem)]"
: "pb-[calc(env(safe-area-inset-bottom)+0.75rem)] sm:pb-[calc(env(safe-area-inset-bottom)+1rem)]",
)}
>
<ChatComposer
ref={composerRef}
composerDraftTarget={composerDraftTarget}
Expand Down
9 changes: 8 additions & 1 deletion apps/web/src/components/ui/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,14 @@ function Sidebar({
<SheetTitle>Sidebar</SheetTitle>
<SheetDescription>Displays the mobile sidebar.</SheetDescription>
</SheetHeader>
<div className="flex h-full w-full flex-col">{children}</div>
<div
className={cn(
"flex h-full w-full flex-col pb-safe pt-safe",
side === "left" ? "pl-safe" : "pr-safe",
)}
>
{children}
</div>
</SheetPopup>
</Sheet>
</SidebarInstanceContext.Provider>
Expand Down
17 changes: 17 additions & 0 deletions apps/web/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,23 @@
}
}

/* Safe-area inset utilities for iOS devices with a Dynamic Island / notch /
home indicator. Used on the topmost chrome surfaces so they stay clear of
the camera and gesture areas when the page is rendered with
viewport-fit=cover. Insets resolve to 0 on devices without safe areas. */
@utility pt-safe {
padding-top: max(env(safe-area-inset-top), 0px);
}
@utility pb-safe {
padding-bottom: max(env(safe-area-inset-bottom), 0px);
}
@utility pl-safe {
padding-left: max(env(safe-area-inset-left), 0px);
}
@utility pr-safe {
padding-right: max(env(safe-area-inset-right), 0px);
}
Comment on lines +65 to +76
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Stylelint config files =="
fd -HI 'stylelint' .

echo
echo "== at-rule rule definitions / ignoreAtRules =="
rg -n --iglob '*stylelint*' 'scss/at-rule-no-unknown|at-rule-no-unknown|ignoreAtRules|utility|theme|variant|custom-variant|source'

echo
echo "== package.json stylelint references =="
rg -n '"stylelint"|stylelint' package.json

Repository: pingdotgg/t3code

Length of output: 157


🏁 Script executed:

cat .stylelintrc.json

Repository: pingdotgg/t3code

Length of output: 1420


Stylelint config must be updated to allow Tailwind v4 @utility at-rules.

The current .stylelintrc.json extends stylelint-config-standard-scss without configuring ignoreAtRules for Tailwind v4's custom at-rules. The @utility declarations at Lines 65, 68, 71, and 74 are valid Tailwind v4 syntax but will be flagged as unknown at-rules by stylelint, blocking CI.

Update .stylelintrc.json to add exception rules:

Configuration fix
{
  "extends": ["stylelint-config-standard-scss"],
  "rules": {
+   "scss/at-rule-no-unknown": [true, {
+     "ignoreAtRules": ["theme", "variant", "custom-variant", "utility", "source"]
+   }],
    "selector-id-pattern": null,
    ...
  }
}
🧰 Tools
🪛 Stylelint (17.9.0)

[error] 65-65: Unexpected unknown at-rule "@Utility" (scss/at-rule-no-unknown)

(scss/at-rule-no-unknown)


[error] 68-68: Unexpected unknown at-rule "@Utility" (scss/at-rule-no-unknown)

(scss/at-rule-no-unknown)


[error] 71-71: Unexpected unknown at-rule "@Utility" (scss/at-rule-no-unknown)

(scss/at-rule-no-unknown)


[error] 74-74: Unexpected unknown at-rule "@Utility" (scss/at-rule-no-unknown)

(scss/at-rule-no-unknown)

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

In `@apps/web/src/index.css` around lines 65 - 76, The Stylelint config is
flagging Tailwind v4's custom at-rule "@utility" in apps/web/src/index.css;
update .stylelintrc.json to allow it by adding or merging a rule entry for
"at-rule-no-unknown" that supplies an ignoreAtRules array including "utility"
(and any other Tailwind at-rules you use), e.g. add "rules": {
"at-rule-no-unknown": [true, { "ignoreAtRules": ["utility"] }] } so the `@utility`
declarations in index.css (padding-safe utilities) are not treated as unknown
at-rules.


/* Suppress all transitions during theme changes */
.no-transitions,
.no-transitions *,
Expand Down
Loading