@@ -28,7 +28,6 @@ import { Channel, ChannelDetails, type ChannelDraft } from "./channel";
2828import { Dashboard } from "./dashboard" ;
2929import { Github , GithubSidebar } from "./github" ;
3030import { useGithubRefresh } from "./github-cache" ;
31- import { GithubLinks , type GithubTarget } from "./github-link" ;
3231import { desktop , titlebar } from "./desktop" ;
3332import { host } from "./host" ;
3433import { Rename } from "./layout/rename" ;
@@ -38,6 +37,9 @@ import { projectId, projects } from "./projects";
3837import { Settings } from "./settings" ;
3938import { UpdateNotice } from "./updates" ;
4039
40+ // Older versions saved an inline GitHub item per project; Ace now opens items on GitHub.
41+ localStorage . removeItem ( `ace:github-targets:${ host . url } ` ) ;
42+
4143/**
4244 * On a phone the channel list is a drawer over the channel: open while no channel is chosen, and
4345 * out of the way once one is.
@@ -135,9 +137,6 @@ export function App() {
135137 const [ settings , setSettings ] = useState < boolean | "updates" > ( false ) ;
136138 const [ draft , setDraft ] = useState < ChannelDraft > ( ) ;
137139 const [ renaming , setRenaming ] = useState < { id : string ; name : string } > ( ) ;
138- const [ github , setGithub ] = useLocalStorage <
139- Record < string , Partial < Record < "issues" | "prs" , GithubTarget > > >
140- > ( `ace:github-targets:${ host . url } ` , { } ) ;
141140 const [ left , setLeft ] = useLocalStorage ( "panel:left" , true ) ;
142141 const [ width , setWidth ] = useLocalStorage ( "panel:left:width" , 200 ) ;
143142 const [ collapsed , setCollapsed ] = useState < Record < SessionSidebarGroupId , boolean > > ( {
@@ -279,23 +278,9 @@ export function App() {
279278 setRenaming ( undefined ) ;
280279 }
281280
282- function setTarget ( kind : "issues" | "prs" , target ?: GithubTarget ) {
283- if ( ! current ) return ;
284- setGithub ( ( value ) => ( {
285- ...value ,
286- [ current . id ] : { ...value [ current . id ] , [ kind ] : target } ,
287- } ) ) ;
288- }
289-
290- function openGithub ( target : GithubTarget ) {
291- setTarget ( target . kind , target ) ;
292- setPage ( target . kind ) ;
293- }
294-
295281 return (
296282 < ThemeProvider storageKey = "ace-theme" >
297283 < TooltipProvider >
298- { current && < GithubLinks onOpen = { openGithub } /> }
299284 < Layout
300285 appearance = { desktop ? "native" : "web" }
301286 defaultNavOpen = { false }
@@ -375,7 +360,6 @@ export function App() {
375360 connected = { connected }
376361 onProject = { setProject }
377362 onOpen = { ( ) => void choose ( ) }
378- onTarget = { ( target ) => setTarget ( page , target ) }
379363 />
380364 ) }
381365 </ Sidebar >
@@ -421,8 +405,8 @@ export function App() {
421405 key = { `${ current . id } :${ page } ` }
422406 kind = { page }
423407 project = { current }
424- target = { github [ current . id ] ?. [ page ] }
425- onTarget = { ( target ) => setTarget ( page , target ) }
408+ connected = { connected }
409+ onCreate = { local ? create : undefined }
426410 />
427411 )
428412 : channel
0 commit comments