feat: add windows support to [[wildcard]] config#346
feat: add windows support to [[wildcard]] config#346jradtilbrook wants to merge 2 commits intojoshmedeski:mainfrom
Conversation
Allow wildcard config entries to specify a windows layout, consistent with how [[session]] configs support the windows field. This lets users define a single wildcard pattern that applies both startup commands and window layouts to all matching directories.
There was a problem hiding this comment.
Pull request overview
Adds support for applying a predefined window layout when creating sessions via [[wildcard]] config matches, aligning wildcard behavior with existing session window layout configuration.
Changes:
- Extend
model.WildcardConfigwith awindowsfield and wire it into wildcard-based connections. - Update tests to assert
WindowNamesis propagated for wildcard-created sessions. - Update the JSON schema and README to document/validate the new
windowsfield.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
model/config.go |
Adds Windows []string to WildcardConfig to support window layouts in wildcard configs. |
connector/config_wildcard.go |
Propagates wc.Windows into the created session’s WindowNames. |
connector/config_wildcard_test.go |
Verifies wildcard connections set Session.WindowNames as expected. |
sesh.schema.json |
Adds windows to the wildcard config schema definition. |
README.md |
Documents the new windows field for [[wildcard]] entries. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
connector/config_wildcard.go
Outdated
| Src: "config_wildcard", | ||
| Name: nameFromPath, | ||
| Path: absPath, | ||
| WindowNames: wc.Windows, |
There was a problem hiding this comment.
disable_startup_command in [[wildcard]] currently only disables the wildcard’s own startup_command (see startup/config_wildcard.go), but defaultConfigStrategy will still run because session.DisableStartupCommand is never set for wildcard-created sessions. Consider setting DisableStartupCommand: wc.DisableStartCommand on the returned model.SeshSession here so wildcard behavior matches [[session]] and truly suppresses startup commands when requested.
| Src: "config_wildcard", | |
| Name: nameFromPath, | |
| Path: absPath, | |
| WindowNames: wc.Windows, | |
| Src: "config_wildcard", | |
| Name: nameFromPath, | |
| Path: absPath, | |
| WindowNames: wc.Windows, | |
| DisableStartupCommand: wc.DisableStartCommand, |
|
Hey! I noticed this PR has been waiting for a bit. If it helps, I’d be happy to take a pass at applying the review suggestions |
Summary
windowsfield to[[wildcard]]config entries, consistent with the existingwindowsfield on[[session]]configsUsage
Changes
model/config.go— addedWindows []stringtoWildcardConfigstructconnector/config_wildcard.go— passwc.Windowsto sessionWindowNameswhen connectingconnector/config_wildcard_test.go— added assertion forWindowNamesin wildcard testsesh.schema.json— addedwindowsarray to wildcard schema definitionREADME.md— documented thewindowsfield in the wildcard config table