macos_hackarounds: spurious hacks to support macos (@goodboy's re-work/base) #78

Open
goodboy wants to merge 15 commits from macos_hackarounds into main

15 Commits (main)

Author SHA1 Message Date
Gud Boi 4cfc2b695f Fix chart axis scaling on UI zoom level change
Again a patch (vibed) from our very own @dnks
(just a commit msg reworking using his new `/commit-msg` skill added by
@goodboy B)

Deats,
- add `Axis.update_fonts()` to recalculate tick font, text offset,
  bounding rect and `pyqtgraph`'s internal text-width/height tracking
  after a zoom change; store `_typical_max_str` at init for later reuse.
- rework `PriceAxis.size_to_values()` and
  `DynamicDateAxis.size_to_values()` to use pyqtgraph's
  `_updateWidth()`/`_updateHeight()` with `updateGeometry()` instead of
  raw `setWidth()`/ `setHeight()` so auto-expand constraints are
  respected.
- fix `GlobalZoomEventFilter` to mask out `KeypadModifier` and
  explicitly require both Ctrl+Shift, letting plain Ctrl+Plus/Minus pass
  through to chart zoom.
- add `_update_chart_axes()` to walk all plot-item axes during
  `_apply_zoom()` and call `splits.resize_sidepanes()` to sync subplot
  widths.

(this commit msg, and likely patch, was generated in some part by
[`claude-code`][claude-code-gh])
[claude-code-gh]: https://github.com/anthropics/claude-code
2026-03-04 22:21:38 -05:00
Gud Boi 22720e33fd gitignore: start a "tina sw" section with `vscode` settings 2026-03-04 21:51:15 -05:00
Gud Boi 98ab543f95 Add global UI font-size zoom scaling (from @dnks)
Add `Ctrl+Shift+Plus/Minus/0` shortcuts for zooming all
UI widget font sizes via a `GlobalZoomEventFilter`
installed at the `QApplication` level.

Deats,
- `.ui._window`: add `GlobalZoomEventFilter` event
  filter class and `MainWindow.zoom_in/out/reset_zoom()`
  methods that reconfigure `DpiAwareFont` with a
  `zoom_level` multiplier then propagate to all child
  widgets.
- `.ui._style`: extend `DpiAwareFont.configure_to_dpi()`
  and `_config_fonts_to_screen()` to accept a
  `zoom_level` float multiplier; cast `px_size` to `int`.
- `.ui._forms`: add `update_fonts()` to `Edit`,
  `Selection`, `FieldsForm` and `FillStatusBar` for
  stylesheet regen.
- `.ui._label`: add `FormatLabel.update_font()` method.
- `.ui._position`: add `SettingsPane.update_fonts()`.
- `.ui._search`: add `update_fonts()` to `CompleterView`
  and `SearchWidget`.
- `.ui._exec`: install the zoom filter on window show.
- `.ui.qt`: import `QObject` from `PyQt6`.

(this commit msg was generated in some part by [`claude-code`][claude-code-gh])
[claude-code-gh]: https://github.com/anthropics/claude-code
2026-03-04 18:24:59 -05:00
Gud Boi 718d4bad25 Revert to checking a `.hist` suffix in shm file name
That is, in-mem history buffer files should have a `.hist` suffix (which
was added back instead of the weird `.h` change from the rebased
8352d89e).

I'm pretty sure we can afford the 3 extra chars if we're already
truncating to a max 16 char `key: str = f'{uuid[:8]}_{fqme_hash}'`, per
@goodboy's edit from the original key-truncation approach in the
original original @dnks patch: 75d8582b).
2026-03-04 18:21:57 -05:00
wygud ae4fb38bde Various patches for macOS (orig from @dnks)
Generally hackarounds to various modules to cope with either
linux-specific runtime incompats, file-name-len limits on macos, or
oddly specific to @dnks' setup config template hardcodings XD

(Obvi this commit msg was edited/reformated by @goodboy, who's also
tossed in interleaved todo bullets around each "change")

Hi-level summary,
- config/conf.toml for updated UI font size and graphics throttle.
  - [ ] remove this since it's a project template.
- piker/cli/__init__.py -> Changed transport from UDP to TCP in service
  manager.
  - [ ] this should be the default anyway, likely it was left that way
    on a dev-testing branch this history was clone from..
- piker/data/_symcache.py -> Added recursive dict cleaning for TOML
  serialization.
- piker/fsp/_api.py -> Hash-based key for shared memory buffers (macOS
  compatibility).
- piker/tsp/__init__.py -> Hash-based key for history buffers for macOS
  compatibility.
  * conflict-reso-note: was adjusted by @goodboy in new code location
    `.tsp._history` mod and keeps the orig keying for linux, only
    shortens on mac.
- piker/ui/_display.py -> Modified SHM name assertion for macOS
  compatibility.

Unmentioned changes noticed by @goodboy,
- adds a new `piker.sh` which should be unnecessary pending proper macos
  support in `tractor` via `platformdirs`,
  * 474f1dc4a7
2026-03-04 18:17:55 -05:00
Gud Boi b23285bbda Fix `commit-msg` skill for docs compliance
Refactor `SKILL.md` to adhere to claude-code skills docs and
eliminate content duplication with the supporting file.

Deats,
- fix `allowed-tools` from YAML list to comma-separated string
  per frontmatter spec.
  * https://code.claude.com/docs/en/skills#frontmatter-reference
- drop ~220 lines of inlined style-guide content that duplicated
  `style-guide-reference.md`; replace with compact "Quick
  Reference" section + markdown link to the full guide.
- fix supporting file ref from backtick-code to proper markdown
  link syntax: `[style-guide-reference.md](./...)`.
- inline the file-writing instructions (timestamp + hash filename
  format) directly, replacing the now-broken `CLAUDE.md` ref.

Also,
- add missing "commit msg" footer variant to
  `style-guide-reference.md` (previously only showed "patch").
- move `.claude/CLAUDE.md` -> `style-guide-reference.md` as
  proper skill supporting file.

(this patch was generated in some part by [`claude-code`][claude-code-gh])
[claude-code-gh]: https://github.com/anthropics/claude-code
2026-03-04 15:45:46 -05:00
Gud Boi 0a36b63a9f Clarify commit msg footer change when patch is human 2026-03-04 14:11:04 -05:00
Gud Boi 55ad3ee573 Add macos ignorelines from @dnks 2026-03-04 14:10:34 -05:00
Gud Boi b1588b5e1b Factor `.claude/skills/` into proper subdirs w/ frontmatter
Reorganize all 5 skills from loose `.md` files (and one
partially-formatted `commit_msg/`) into the documented
`subdirectory/SKILL.md` format with YAML frontmatter.

Deats,
- `commit_msg/` -> `commit-msg/` w/ enhanced frontmatter:
  `argument-hint`, `disable-model-invocation`,
  `allowed-tools`, dynamic `!` context injection for
  staged diff + recent log, `$ARGUMENTS` support
- `piker_profiling.md` -> `piker-profiling/SKILL.md` +
  `patterns.md` for detailed profiling patterns
- `piker_slang_and_communication_style.md` ->
  `piker-slang/SKILL.md` + `dictionary.md` +
  `examples.md`
- `pyqtgraph_rendering_optimization.md` ->
  `pyqtgraph-optimization/SKILL.md` + `examples.md`
- `timeseries_numpy_polars_optimization.md` ->
  `timeseries-optimization/SKILL.md` +
  `numpy-patterns.md` + `polars-patterns.md`

Also,
- all background skills use `user-invocable: false`
  for auto-application when relevant.
- use a hyphen convention across all dir names.
- content is now split into supporting files linked from each
  `SKILL.md`.

(this patch was generated in some part by
[`claude-code`][claude-code-gh])
[claude-code-gh]: https://github.com/anthropics/claude-code
2026-02-27 12:53:10 -05:00
Gud Boi 13d06f72c8 Ignore `gish` locally cached issue `.md` files
We may eventually want to actually track these in git itself so we can
check/sync state with the corresponding git hosting service however? I'm
not sure how feasible it'll be but def worth thinking about Bp
2026-02-27 12:53:09 -05:00
Gud Boi 6d35ed6057 Add `claude` settings config `.json` 2026-02-27 12:52:51 -05:00
Gud Boi d8a9e63483 Ignore more specialized `.<subdir>` content
- any `claude` commit-msg gen tmp files used for my `claude.commit`
  thingie.
- any `nix develop --profile .nixdev` profile cache file.
- an `Session.vim` state-file used by `:Obsession .`.
2026-02-27 12:52:21 -05:00
Gud Boi 9ec7423c5f Add `.claude/CLAUDE.md`, commit-msg-gen stuffs rn
Since apparently my commit-msg generator thingie stores the "training"
prompt content in this file by default.. REALLY this should be put into
a `SKILL.md` or similar later so that only truly global ctx content is
put here.
2026-02-27 12:52:04 -05:00
Gud Boi 4efc59068c Ignore files under `.git/`
Since `telescope` uses it for file finding.
2026-02-27 12:52:01 -05:00
Gud Boi a6212af3d5 Add `.claude/skills/*` files from gap-annotator perf sesh with ma boi 2026-02-27 12:51:20 -05:00