Extract custom watch paths to specifications#7220
Open
isaacroldan wants to merge 3 commits into04-08-use_extension_handle_to_identify_extensions_in_file-watcherfrom
Open
Conversation
Contributor
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
0748fb6 to
756d842
Compare
8658f96 to
e3a34f3
Compare
756d842 to
d70b812
Compare
4 tasks
d70b812 to
dbe5497
Compare
e3a34f3 to
b5640a9
Compare
dbe5497 to
d33c06d
Compare
b5640a9 to
8053877
Compare
4 tasks
4 tasks
8053877 to
cc5abaa
Compare
d33c06d to
1e0e9ea
Compare
1e0e9ea to
7efd3f7
Compare
4c6daca to
1ba2dd9
Compare
6a83b0d to
7403589
Compare
1ba2dd9 to
5dfacdb
Compare
craigmichaelmartin
requested changes
Apr 9, 2026
Contributor
craigmichaelmartin
left a comment
There was a problem hiding this comment.
Love these changes! Just a few comments I want to make sure we evaluate!
8c27933 to
fc760cc
Compare
fc760cc to
3383e69
Compare
Co-authored-by: Claude Code <claude-code@anthropic.com>
…onWatchConfig Co-authored-by: Claude Code <claude-code@anthropic.com>
Co-authored-by: Claude Code <claude-code@anthropic.com>
3383e69 to
d1271b9
Compare
7403589 to
296ba04
Compare
Contributor
Differences in type declarationsWe detected differences in the type declarations generated by Typescript for this branch compared to the baseline ('main' branch). Please, review them to ensure they are backward-compatible. Here are some important things to keep in mind:
New type declarationsWe found no new type declarations in this PR Existing type declarationspackages/cli-kit/dist/private/node/ui.d.ts import { Logger, LogLevel } from '../../public/node/output.js';
-import React from 'react';
import { Key, RenderOptions } from 'ink';
import { EventEmitter } from 'events';
-/**
- * Signal that the current Ink tree is done. Must be called within an
- * InkLifecycleRoot — throws if the provider is missing so lifecycle
- * bugs surface immediately instead of silently hanging.
- */
-export declare function useComplete(): (error?: Error) => void;
-/**
- * Root wrapper for Ink trees. Owns the single `exit()` call site — children
- * signal completion via `useComplete()`, which sets state here. The `useEffect`
- * fires post-render, guaranteeing all batched state updates have been flushed
- * before the tree is torn down.
- */
-export declare function InkLifecycleRoot({ children }: {
- children: React.ReactNode;
-}): React.JSX.Element;
interface RenderOnceOptions {
logLevel?: LogLevel;
logger?: Logger;
renderOptions?: RenderOptions;
}
export declare function renderOnce(element: JSX.Element, { logLevel, renderOptions }: RenderOnceOptions): string | undefined;
-export declare function render(element: JSX.Element, options?: RenderOptions): Promise<void>;
+export declare function render(element: JSX.Element, options?: RenderOptions): Promise<unknown>;
export declare class Stdout extends EventEmitter {
columns: number;
rows: number;
readonly frames: string[];
private _lastFrame?;
constructor(options: {
columns?: number;
rows?: number;
});
write: (frame: string) => void;
lastFrame: () => string | undefined;
}
export declare function handleCtrlC(input: string, key: Key, exit?: () => void): void;
export {};
packages/cli-kit/dist/public/node/ui.d.ts@@ -34,7 +34,7 @@ export interface RenderConcurrentOptions extends PartialBy<ConcurrentOutputProps
* 00:00:00 │ frontend │ third frontend message
*
*/
-export declare function renderConcurrent({ renderOptions, ...props }: RenderConcurrentOptions): Promise<void>;
+export declare function renderConcurrent({ renderOptions, ...props }: RenderConcurrentOptions): Promise<unknown>;
export type AlertCustomSection = CustomSection;
export type RenderAlertOptions = Omit<AlertOptions, 'type'>;
/**
|
craigmichaelmartin
approved these changes
Apr 9, 2026
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

WHY are these changes introduced?
The current file watching system for dev sessions uses a hardcoded approach where function extensions have custom watch paths while other extensions watch everything. This creates inconsistent behavior and makes it difficult for different extension types to define their own watching requirements.
WHAT is this pull request doing?
Refactors the dev session file watching system to use a specification-based approach:
devSessionCustomWatchPathswith a newdevSessionWatchConfigmethod on extension specificationsDevSessionWatchConfiginterface that allows extensions to define both paths to watch and patterns to ignoreExtensionInstanceclass to the function specificationstatic_rootdirectory when configuredHow to test your changes?
build.watchconfiguration and verify it only watches the specified paths plus default files (locales, GraphQL, TOML)static_rootconfigured and verify it only watches files in that directoryChecklist
pnpm changeset add