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
53 changes: 31 additions & 22 deletions .claude/hooks/post-edit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,43 +10,52 @@
# 0 = success (formatting applied silently)
# 2 = lint errors found (fed back to Claude as feedback; ignored by Copilot)

# Parse file path - handles both Claude Code and Copilot input formats
FILE_PATH=$(cat | node -e "
let d='';
process.stdin.on('data',c=>d+=c);
process.stdin.on('end',()=>{
try {
const j=JSON.parse(d);
if (j.tool_input?.file_path) { console.log(j.tool_input.file_path); return; }
if (j.toolArgs) { const a=JSON.parse(j.toolArgs); if (a.path) console.log(a.path); }
} catch {}
})
# Parse file path - optimized with synchronous read
FILE_PATH=$(node -e "
const d=require('fs').readFileSync(0,'utf8');
try {
const j=JSON.parse(d);
console.log(j.tool_input?.file_path||JSON.parse(j.toolArgs||'{}').path||'');
} catch {}
")

# Skip if no file path or file doesn't exist
[[ -z "$FILE_PATH" || ! -f "$FILE_PATH" ]] && exit 0

# Find the nearest package directory with eslint config
# Skip if not a lintable file (early exit for performance)
case "$FILE_PATH" in
*.js|*.jsx|*.ts|*.tsx|*.mjs|*.cjs) ;;
*) exit 0 ;;
esac

# Find workspace root and package directory in single pass
SEARCH_DIR=$(dirname "$FILE_PATH")
WORKSPACE_ROOT=""
PACKAGE_DIR=""

while [[ "$SEARCH_DIR" != "/" ]]; do
if [[ -f "$SEARCH_DIR/eslint.config.mjs" ]]; then
PACKAGE_DIR="$SEARCH_DIR"
# Check for both markers in parallel
[[ -z "$PACKAGE_DIR" && -f "$SEARCH_DIR/eslint.config.mjs" ]] && PACKAGE_DIR="$SEARCH_DIR"
if [[ -f "$SEARCH_DIR/pnpm-workspace.yaml" ]]; then
WORKSPACE_ROOT="$SEARCH_DIR"
break
fi
SEARCH_DIR=$(dirname "$SEARCH_DIR")
done

# Auto-format with prettier from the package directory
if [[ -n "$PACKAGE_DIR" ]]; then
(cd "$PACKAGE_DIR" && pnpm exec prettier --write "$FILE_PATH" 2>/dev/null)
else
pnpm exec prettier --write "$FILE_PATH" 2>/dev/null
fi
# Skip if no workspace found
[[ -z "$WORKSPACE_ROOT" ]] && exit 0

# Auto-format with prettier (capture output to check if file changed)
PRETTIER_OUT=$(cd "$WORKSPACE_ROOT" && pnpm exec prettier --write "$FILE_PATH" 2>&1)
PRETTIER_EXIT=$?

# Skip linting if prettier failed
[[ $PRETTIER_EXIT -ne 0 ]] && exit 0

# Run lint from the package directory using the project's lint setup
# Lint from package directory with cache enabled
if [[ -n "$PACKAGE_DIR" ]]; then
LINT_OUTPUT=$(cd "$PACKAGE_DIR" && pnpm run lint 2>&1)
LINT_OUTPUT=$(cd "$PACKAGE_DIR" && pnpm exec eslint --cache --cache-location .eslintcache "$FILE_PATH" 2>&1)
if [[ $? -ne 0 ]]; then
echo "$LINT_OUTPUT" >&2
exit 2
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@ automation/run-e2e/ctrf/*.json
.cursor
.windsurf
.claude/settings.local.json
.claude/audit.log
.eslintcache
2 changes: 2 additions & 0 deletions packages/pluggableWidgets/datagrid-web/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),

### Fixed

- We fixed an issue where rows incorrectly showed a pointer cursor when using checkbox selection. Now the clickable cursor only appears when selection method is set to row click or when a row has an onClick action.

- We fixed an issue with Data export crashing on some Android devices.

## [3.8.1] - 2026-02-19
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ function isSettingsStorageEnabled(props: DatagridContainerProps): boolean {
}

function isInteractive(props: DatagridContainerProps): boolean {
return props.itemSelection !== undefined || props.onClick !== undefined;
const hasRowClickSelection = props.itemSelection && props.itemSelectionMethod === "rowClick";
const hasOnClickAction = props.onClick !== undefined;
return hasRowClickSelection || hasOnClickAction;
}

function selectionType(props: DatagridContainerProps): SelectionType {
Expand Down
Loading
Loading