Compare commits
2
Commits
18cbb4e47b
...
6d4a642773
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6d4a642773 | ||
|
|
70c1bd3598 |
@@ -55,7 +55,7 @@ Entries should be short imperative phrases that describe user-facing impact —
|
||||
|
||||
### Be concise — this is the rule, not a suggestion
|
||||
|
||||
CHANGELOG entries must be **one or two short sentences**. Strict ceiling: **40 words per bullet**, hard cap at 60. If you can't say it in one line wrapped at ~75 columns, you're writing the wrong document.
|
||||
CHANGELOG entries must be **one or two short sentences**. Hard cap: **60 words per bullet** (enforced by `ci/changelog_gate.sh`). Aim for 30 or under; if you can't say it in one line wrapped at ~75 columns, you're writing the wrong document.
|
||||
|
||||
The CHANGELOG is read by humans scanning for what changed between two versions. It is **not** the place for the rationale, the probe results, the implementation detail, the behavior-change deep dive, or the "see also" cross-references. Those belong in:
|
||||
|
||||
|
||||
@@ -111,6 +111,13 @@ heading, and (b) bumping `pubspec.yaml` `version:` in the same commit.
|
||||
|
||||
### Changed
|
||||
|
||||
- Window-control close-button red, white close glyph, and palette
|
||||
ambient shadow are now tokens (`windowControl.closeHover*`,
|
||||
`shadow.ambient`) instead of hard-coded hex. Light themes get a
|
||||
softer ink-tinted shadow (T-114).
|
||||
- Changelog gate is binary — dropped the soft 40-word warning, kept
|
||||
the 60-word hard cap. Warnings that never blocked just normalised
|
||||
drift.
|
||||
- PTY spawning uses `posix_openpt` + `posix_spawn` instead of
|
||||
`forkpty` — closes a ~5% deadlock window in the multithreaded Dart
|
||||
VM (T-96, D-5 amended). Missing exe/cwd now throw `PtyException` at
|
||||
|
||||
+10
-22
@@ -1,15 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
# CHANGELOG concision gate — enforces the per-bullet word caps from the
|
||||
# git-commit skill (40 soft, 60 hard) across the `## [Unreleased]`
|
||||
# section. Released sections are frozen and skipped (don't penalize
|
||||
# historical entries pre-dating the rule).
|
||||
# CHANGELOG concision gate — enforces a single 60-word per-bullet hard
|
||||
# cap on the `## [Unreleased]` section. Released sections are frozen
|
||||
# and skipped (don't penalize historical entries pre-dating the rule).
|
||||
#
|
||||
# A "bullet" is a markdown list item beginning with `- `, including any
|
||||
# indented continuation lines until the next bullet, blank line, or
|
||||
# heading. Word count is whitespace-tokenized.
|
||||
#
|
||||
# Soft cap 40 → warn (non-zero exit only if HARD is also breached).
|
||||
# Hard cap 60 → fail.
|
||||
# A soft 40-word warning was tried earlier and dropped — warnings that
|
||||
# never block a push just normalise drift, so the gate is now binary.
|
||||
#
|
||||
# Bypass: never. If the rule rejects something genuinely user-visible
|
||||
# that needs more context, the context belongs in the commit body or a
|
||||
@@ -18,7 +17,6 @@ set -euo pipefail
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
CHANGELOG=CHANGELOG.md
|
||||
SOFT_CAP=40
|
||||
HARD_CAP=60
|
||||
|
||||
if [[ ! -f "$CHANGELOG" ]]; then
|
||||
@@ -26,24 +24,18 @@ if [[ ! -f "$CHANGELOG" ]]; then
|
||||
exit 2
|
||||
fi
|
||||
|
||||
awk -v soft="$SOFT_CAP" -v hard="$HARD_CAP" '
|
||||
BEGIN { in_unreleased = 0; bullet = ""; bullet_start = 0; fail = 0; warn = 0 }
|
||||
awk -v hard="$HARD_CAP" '
|
||||
BEGIN { in_unreleased = 0; bullet = ""; bullet_start = 0; fail = 0 }
|
||||
|
||||
function check_bullet() {
|
||||
if (bullet == "") return
|
||||
n = split(bullet, _words, /[[:space:]]+/)
|
||||
# split() counts a trailing empty token when the string starts/ends with
|
||||
# whitespace; trim the leading "- " marker too.
|
||||
# Trim the leading "- " marker, then tokenize on whitespace.
|
||||
gsub(/^- +/, "", bullet)
|
||||
n = split(bullet, _words, /[[:space:]]+/)
|
||||
if (n > hard) {
|
||||
printf "FAIL line %d: bullet is %d words (hard cap %d)\n", bullet_start, n, hard
|
||||
printf "FAIL line %d: bullet is %d words (cap %d)\n", bullet_start, n, hard
|
||||
printf " %s\n\n", substr(bullet, 1, 120) (length(bullet) > 120 ? "..." : "")
|
||||
fail++
|
||||
} else if (n > soft) {
|
||||
printf "WARN line %d: bullet is %d words (soft cap %d)\n", bullet_start, n, soft
|
||||
printf " %s\n\n", substr(bullet, 1, 120) (length(bullet) > 120 ? "..." : "")
|
||||
warn++
|
||||
}
|
||||
bullet = ""
|
||||
bullet_start = 0
|
||||
@@ -76,10 +68,6 @@ awk -v soft="$SOFT_CAP" -v hard="$HARD_CAP" '
|
||||
printf " See .claude/skills/git-commit/SKILL.md \"Be concise\".\n"
|
||||
exit 1
|
||||
}
|
||||
if (warn > 0) {
|
||||
printf "==> changelog gate OK with %d warning(s) over %d words.\n", warn, soft
|
||||
} else {
|
||||
printf "==> changelog gate OK\n"
|
||||
}
|
||||
printf "==> changelog gate OK\n"
|
||||
}
|
||||
' "$CHANGELOG"
|
||||
|
||||
+6
-2
@@ -346,7 +346,7 @@ class _WinBtn extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final hoverBg = isClose ? const Color(0xFFE81123) : tokens.listItemHoverBackground;
|
||||
final hoverBg = isClose ? tokens.windowControlCloseHoverBackground : tokens.listItemHoverBackground;
|
||||
return ClideTappable(
|
||||
onTap: onTap,
|
||||
builder: (context, hovered, _) => Container(
|
||||
@@ -354,7 +354,11 @@ class _WinBtn extends StatelessWidget {
|
||||
height: hatHeight,
|
||||
color: hovered ? hoverBg : null,
|
||||
alignment: Alignment.center,
|
||||
child: ClideIcon(icon, size: 14, color: hovered && isClose ? const Color(0xFFFFFFFF) : tokens.chromeForeground),
|
||||
child: ClideIcon(
|
||||
icon,
|
||||
size: 14,
|
||||
color: hovered && isClose ? tokens.windowControlCloseHoverForeground : tokens.chromeForeground,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -96,6 +96,9 @@ class ThemeResolver {
|
||||
modalOverlayBackground: surface[TokenKeys.modalOverlayBackground]!,
|
||||
modalSurfaceBackground: surface[TokenKeys.modalSurfaceBackground]!,
|
||||
modalSurfaceBorder: surface[TokenKeys.modalSurfaceBorder]!,
|
||||
windowControlCloseHoverBackground: surface[TokenKeys.windowControlCloseHoverBackground]!,
|
||||
windowControlCloseHoverForeground: surface[TokenKeys.windowControlCloseHoverForeground]!,
|
||||
shadowAmbient: surface[TokenKeys.shadowAmbient]!,
|
||||
dividerColor: surface[TokenKeys.dividerColor]!,
|
||||
statusSuccess: surface[TokenKeys.statusSuccess]!,
|
||||
statusWarning: surface[TokenKeys.statusWarning]!,
|
||||
@@ -250,6 +253,14 @@ const Map<String, List<String>> _defaultSurfaceMap = {
|
||||
TokenKeys.modalOverlayBackground: ['#C0000000'],
|
||||
TokenKeys.modalSurfaceBackground: ['surface', 'semantic.mainchrome'],
|
||||
TokenKeys.modalSurfaceBorder: ['accent', 'semantic.focus'],
|
||||
// window controls — the Windows-style red close button is a hard
|
||||
// platform convention, not a theme accent; the foreground stays
|
||||
// white so the glyph remains visible across all themes.
|
||||
TokenKeys.windowControlCloseHoverBackground: ['#FFE81123'],
|
||||
TokenKeys.windowControlCloseHoverForeground: ['#FFFFFFFF'],
|
||||
// shadow — translucent black works for dark themes; light themes can
|
||||
// override this to a translucent ink (e.g. paper uses softer alpha).
|
||||
TokenKeys.shadowAmbient: ['#40000000'],
|
||||
// divider
|
||||
TokenKeys.dividerColor: ['border', 'semantic.surface'],
|
||||
// status
|
||||
|
||||
@@ -28,6 +28,9 @@ palette:
|
||||
textMute: "#7A7A72"
|
||||
accentSoft: "#218E2D10"
|
||||
|
||||
surface:
|
||||
shadow.ambient: "#26000000"
|
||||
|
||||
syntax:
|
||||
keyword: "#52215C"
|
||||
type: "#154168"
|
||||
|
||||
@@ -25,6 +25,9 @@ palette:
|
||||
textMute: "#A8A89E"
|
||||
accentSoft: "#21C14B2A"
|
||||
|
||||
surface:
|
||||
shadow.ambient: "#26000000"
|
||||
|
||||
syntax:
|
||||
keyword: "#7B3F8C"
|
||||
type: "#2A6FC1"
|
||||
|
||||
@@ -74,6 +74,11 @@ class SurfaceTokens {
|
||||
required this.modalOverlayBackground,
|
||||
required this.modalSurfaceBackground,
|
||||
required this.modalSurfaceBorder,
|
||||
// window controls
|
||||
required this.windowControlCloseHoverBackground,
|
||||
required this.windowControlCloseHoverForeground,
|
||||
// shadow
|
||||
required this.shadowAmbient,
|
||||
// divider
|
||||
required this.dividerColor,
|
||||
// status
|
||||
@@ -155,6 +160,17 @@ class SurfaceTokens {
|
||||
final Color modalSurfaceBackground;
|
||||
final Color modalSurfaceBorder;
|
||||
|
||||
/// Hover background on the Windows-style close button. Conventionally
|
||||
/// the destructive-action red even on dark themes that don't otherwise
|
||||
/// surface red as a CTA.
|
||||
final Color windowControlCloseHoverBackground;
|
||||
final Color windowControlCloseHoverForeground;
|
||||
|
||||
/// Ambient drop-shadow color for floating surfaces (palette,
|
||||
/// dropdowns, modals). Typically a translucent black on dark themes
|
||||
/// and a translucent ink on light themes.
|
||||
final Color shadowAmbient;
|
||||
|
||||
final Color dividerColor;
|
||||
|
||||
final Color statusSuccess;
|
||||
@@ -255,6 +271,13 @@ abstract class TokenKeys {
|
||||
static const modalSurfaceBackground = 'modal.surfaceBackground';
|
||||
static const modalSurfaceBorder = 'modal.surfaceBorder';
|
||||
|
||||
// window controls
|
||||
static const windowControlCloseHoverBackground = 'windowControl.closeHoverBackground';
|
||||
static const windowControlCloseHoverForeground = 'windowControl.closeHoverForeground';
|
||||
|
||||
// shadow
|
||||
static const shadowAmbient = 'shadow.ambient';
|
||||
|
||||
// divider
|
||||
static const dividerColor = 'divider.color';
|
||||
|
||||
@@ -325,6 +348,9 @@ abstract class TokenKeys {
|
||||
modalOverlayBackground,
|
||||
modalSurfaceBackground,
|
||||
modalSurfaceBorder,
|
||||
windowControlCloseHoverBackground,
|
||||
windowControlCloseHoverForeground,
|
||||
shadowAmbient,
|
||||
dividerColor,
|
||||
statusSuccess,
|
||||
statusWarning,
|
||||
|
||||
@@ -108,7 +108,7 @@ class _WinButton extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final hoverBg = isClose ? const Color(0xFFE81123) : tokens.listItemHoverBackground;
|
||||
final hoverBg = isClose ? tokens.windowControlCloseHoverBackground : tokens.listItemHoverBackground;
|
||||
return ClideTappable(
|
||||
onTap: onTap,
|
||||
builder: (context, hovered, _) => Container(
|
||||
@@ -116,7 +116,11 @@ class _WinButton extends StatelessWidget {
|
||||
height: hatHeight,
|
||||
color: hovered ? hoverBg : null,
|
||||
alignment: Alignment.center,
|
||||
child: ClideIcon(icon, size: 14, color: hovered && isClose ? const Color(0xFFFFFFFF) : tokens.globalTextMuted),
|
||||
child: ClideIcon(
|
||||
icon,
|
||||
size: 14,
|
||||
color: hovered && isClose ? tokens.windowControlCloseHoverForeground : tokens.globalTextMuted,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -126,11 +126,11 @@ class _ClidePaletteState extends State<ClidePalette> {
|
||||
color: tokens.dropdownBackground,
|
||||
border: Border.all(color: tokens.dropdownBorder),
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
boxShadow: const [
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: Color(0x40000000),
|
||||
color: tokens.shadowAmbient,
|
||||
blurRadius: 12,
|
||||
offset: Offset(0, 4),
|
||||
offset: const Offset(0, 4),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user